随笔分类 -  SQL

只有注册用户登录后才能阅读该文。
posted @ 2013-04-12 14:04 晓风拂月
摘要:--查询表和视图select * from information_schema.tables--查询视图select * from information_schema.views--查询数据库所有表select * from sysobjects where xtype= 'U' and status> 0sp_tables 或: select * from INFORMATION_SCHEMA.TABLES 或: select * from sysobjects where xtype= 'U ' and status> 0sysobjects 阅读全文
posted @ 2011-10-27 14:54 晓风拂月 阅读(993) 评论(0) 推荐(0)
摘要:(1)INSERTINTO SELECT语句语句形式为:Insert into Table2(field1,field2,...) select value1,value2,... from Table1要求目标表Table2必须存在,由于目标表Table2已经存在,所以我们除了插入源表Table1的字段外,还可以插入常量。(2)SELECTINTO FROM语句语句形式为:SELECT vale1, value2 into Table2 from Table1要求目标表Table2不存在,因为在插入时会自动创建表Table2,并将Table1中指定字段数据复制到Table2中。 阅读全文
posted @ 2011-09-20 13:05 晓风拂月 阅读(273) 评论(0) 推荐(0)