摘要:
1.基础的查询 1)重命名列 select name as '姓名' from 表名 2)定义常量列 select 是否 ='是' from 表名 3)top用法 percent --这种写法可以获取前20%条字段。 select top 20 percent * from 表名 4)去除重复列 selec... 阅读全文
摘要:
1.删除 1)删除记录 Delete from 表名 where id ='xx' 2)删除所有数据,并回归初始化标识字段。 Truncate table 表名 3)delete与truncate区别 a. truncate是能使种子回到初始值 b. truncate不能加条件 c. truncate不能涉及触发器 d. trunca... 阅读全文