select * into test2 from test.语句是将变量*传递给test2。由于*为通配符,所以不正确。如果想将test整个表数据传给test2。可以使用create table test2 as select * from test来建立一个test2表。数据为test中的数据。 select into 是在函数或过程中将表字段数据传递给变量的操作。
在过程,函数,触发器等pl/sql块中都可以使用select into..
select * into test2 from...--并不是SQLSERVER中的建表,如要复制表,用create table .. as select...可以用select xx into bb from...将某一字段值存入变量
select into 是在函数或过程中将表字段数据传递给变量的操作。
建表用create