2014年7月15日
摘要: use master--数据库内置函数select * from sys.all_objects--聚合函数select N'总数' = COUNT(*), N'最大值' = MAX(schema_id), N'最小值' = MIN(schema_id), N'平均值' =... 阅读全文
posted @ 2014-07-15 17:24 yl1993 阅读(243) 评论(0) 推荐(0) 编辑
  2014年7月14日
摘要: begin tryselect 5/0end trybegin catchselectERROR_NUMBER() as N'错误号',ERROR_SEVERITY() as N'错误严重等级',ERROR_STATE() as N'错误状态',ERR... 阅读全文
posted @ 2014-07-14 20:48 yl1993 阅读(348) 评论(0) 推荐(0) 编辑
摘要: create database temp_databaseuse temp_databasecreate table account (ID int primary key not null,amount int not null)insert account values(1,200)insert... 阅读全文
posted @ 2014-07-14 20:09 yl1993 阅读(145) 评论(0) 推荐(0) 编辑
摘要: create database temp_databaseuse temp_database--创建表create table testtable( ID int primary key not null, name varchar(50) not null,)go--插入数据inser... 阅读全文
posted @ 2014-07-14 19:26 yl1993 阅读(214) 评论(0) 推荐(0) 编辑