sql注入语句示例大全_SQL Select Into语句示例说明

sql注入语句示例大全

SQL Select Into语句有什么作用? (What does the SQL Select Into statement do?)

The  SELECT INTO  statement is a query that allows you to create a  new  table and populate it with the result set of a  SELECT statement.

SELECT INTO语句是一个查询,使您可以创建一个表,并使用SELECT statement的结果集填充该SELECT statement

To add data to an existing table, see the INSERT INTO statement instead.

要将数据添加到现有表中,请参阅INSERT INTO语句。

SELECT INTO  can be used when you are combining data from several tables or views into a new table.1 The original table is not affected.

SELECT INTO当你从几个表或视图中的数据组合成一个新的table.1原来的表不会受到影响,可以使用。

The general syntax is:

通用语法为:

SELECT column-names
  INTO new-table-name
  FROM table-name
 WHERE EXISTS 
      (SELECT column-name
         FROM table-name
        WHERE condition)

This example shows a set of a table that was “copied” from the “Supplier” table to a new one called SupplierUSA which holds the set related to the column country of value ‘USA’.

此示例显示了一个表集,该表集是从“供应商”表中“复制”到一个名为SupplierUSA的新表中的,该表中包含与值“ USA”的列国家有关的集合。

SELECT * INTO SupplierUSA
  FROM Supplier
 WHERE Country = 'USA';

Results : 4 rows affected 2

结果 :4行受影响2

IDCompanyNameContactNameCityCountryPhone
2New Orleans Cajun DelightsShelley BurkeNew OrleansUSA(100) 555-4822
3Grandma Kelly’s HomesteadRegina MurphyAnn ArborUSA(313) 555-5735
16Bigfoot BreweriesCheryl SaylorBendUSANULL
19New England Seafood CanneryRobb MerchantBostonUSA(617) 555-3267
ID 公司名 联系人姓名 国家 电话
2 新奥尔良Cajun美食 雪莉·伯克 新奥尔良 美国 (100)555-4822
3 凯利奶奶的家园 里贾纳·墨菲 安阿伯 美国 (313)555-5735
16 大脚怪啤酒厂 谢丽尔·塞勒 弯曲 美国 空值
19 新英格兰海鲜罐头厂 罗伯商人 波斯顿 美国 (617)555-3267

Please see the manual for your database manager and have fun trying different options yourself.

请参阅数据库管理员的手册,并尝试自己尝试其他选项,这很有趣。

Further reading:

进一步阅读:

  1. (Microsoft - Inserting Rows by Using SELECT INTO)[https://technet.microsoft.com/en-us/library/ms190750(v=sql.105).aspx]

    (Microsoft-通过使用SELECT INTO插入行)[ https://technet.microsoft.com/zh-cn/library/ms190750(v= sql.105) .aspx ]

  2. (dofactory - SQL SELECT INTO Statement)[http://www.dofactory.com/sql/select-into]

    (dofactory-SQL SELECT INTO语句)[ http://www.dofactory.com/sql/select-into ]

翻译自: https://www.freecodecamp.org/news/sql-select-into-statement-explained-with-examples/

sql注入语句示例大全

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值