sql调优方法: (1)not in子查询优化 尽量避免子查询select * from a where id not in(select id from b); select * from a where not exists(select id from b WHERE id ='100') 建议使用表连接: select * from a left join b on a.id=b.id WHERE b.id='100'…
一.删除数据库 use master go if exists (select * from sysdatabases where name = 'Demo') drop database Demo go 二.删除表 use PhoneList go if exists (select * from sysobjects where name = 'PCategory') drop table PCategory go 三.子查询 有如下一张学员成绩表: 现在,有这么个需求,查询 C# 考试成绩…