随笔分类 - sql
sql 常识
摘要:SELECT indexname = a.name , tablename = c. name , indexcolumns = d .name , a .indidFROM sysindexes a JOIN sysindexkeys b ON a .id = b .id AND a .indid
阅读全文
摘要:SELECT TOP 1000 ST.text AS '执行的SQL语句', QS.execution_count AS '执行次数', QS.total_elapsed_time AS '耗时', QS.total_logical_reads AS '逻辑读取次数', QS.total_logic
阅读全文
摘要:-select * from sysobjects --select * from syscolumns --select * from syscomments --select * from systypes
阅读全文
摘要:View Code 1 set statistics time on 显示分析、编译和执行各语句所需的毫秒数。2 3 4 select * from messages where id=11115 6 create index id_test_t1 on messages(id)7 select * from messages where id=11118 set statistics time off
阅读全文
摘要:create table messages( id int not null identity, ) select * from messages alter table messages add [user] nvarchar(max) --增加字段 alter table messages add msg text not null -- 增加字段 alter table messages add [time] int not null -- 增加字段 alter table messages drop column [time] --删除字段 a...
阅读全文

浙公网安备 33010602011771号