基于现存表创建新表新表 select into 语句
语法 select select_list into new_table_name from old_table_name [ where search_conditions ] 这个语句实际分为两个步骤:
①根据from字句中指定的表和select list中指定的列,拷贝表结构建立一个新表.
②根据where字句中选中的行数据,插入到新表中。如果要创建空表,可加一个总是不能成立的where子句。
举例: ①从表 titles 创建一名字为 newtitle 的表, select * into student_new from student
②从表 publishers 创建一个名字为 newpubs 的表,但它不含 数据行: select * into student_new from student where 1=2(不成立的条件)