简体   繁体   English

SQL:在另一个表的列中选择一列

[英]SQL: Select One column into a column in another table

Select ISO_2_LETTER_CODE 
from #TempTable
INTO ODBCTest

But i keep getting error:Incorrect syntax near the keyword 'INTO'. 但我一直收到错误:关键字'INTO'附近的语法不正确。

I think your syntax is wrong. 我认为你的语法错了。 Try this: 尝试这个:

Select ISO_2_LETTER_CODE
INTO ODBCTest
From #TempTable

The syntax for SELECT INTO is: SELECT INTO的语法为:

SELECT Column1, Column2, Column3, INTO Table2 FROM Table1 SELECT Column1,Column2,Column3,INTO Table2 FROM Table1

So The syntax would be: 所以语法是:

SELECT ISO_2_LETTER_CODE INTO ODBCTest FROM #TempTable SELECT #_2_LETTER_CODE INTO ODBCTest FROM #TempTable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL: SELECT 如果一列中的条目对应于不同表的另一列 - SQL: SELECT if entry in one column corresponds to another column of a different table 创建表时,从另一个表中选择一个列 - while creating a table select one column from another table sql SQL SELECT值从一个表中的列按顺序(一个接一个)到另一个表中的列 - SQL SELECT Values from column in one table to a column in another table in order (one by one) SQL从一个表列中选择一个最小值,然后将结果插入一个SQL语句的另一个表列中 - Sql Select a minimum value from a table column and insert the results in another table column in one SQL statement 在SQL中将表的一列替换为另一表的另一列 - Replace one column of a table with another column of another table in SQL 如何根据另一个表列从一个表中选择一列? - how to select a column from one table according to another table column? SQL Server通过汇总选择一列,但不选择另一列 - SQL Server Select one column by aggregate but not another SQL选择一个表中的所有列和另一个表上另一列的最大值 - SQL Select all columns from one table and Max value of another column on another table SQL选择,匹配一列而不是另一列 - SQL Select, Match one column but not another 使用另一个表中的列值更新一个表中的列的值SQL? - Updating the values of a column in one table with the values of a column in another table SQL?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM