SQL 基本语法

 1 --default 设置默认值
 2 --not null 不允许为空
 3 
 4 
 5 
 6 create table #test(
 7 id int PRIMARY KEY,
 8 name nvarchar(50) default '默认值',
 9 name2 nvarchar(50) not null,
10 )
创建表
1  /* 备份 */
2  backup database Test to disk='D:/Test.bak'
3  /* 还原 */
4  restore database Test from disk='D:/Test.bak'
备份还原数据库
1 INSERT INTO table_name (列1, 列2,...) VALUES
2  (值1, 值2,....),
3  (值11, 值22,....)
一次性插入多条数据

 

posted @ 2019-09-06 16:44  Alex_Mercer  阅读(72)  评论(0)    收藏  举报