随笔分类 -  SQL

摘要:可总结为:当子查询表比主查询表大时,用Exists;当子查询表比主查询表小时,用inSQL中in可以分为三类: 1、形如select * from t1 where f1 in ('a','b'),应该和以下两种比较效率 select * from t1 where f1='a' or f1='... 阅读全文
posted @ 2014-10-14 15:30 marco_tan 阅读(269) 评论(0) 推荐(0)
摘要:if object_id('student', 'U') is not null drop table studentgocreate table student( sno varchar(20) not null , sage decimal not null, sname varchar(20... 阅读全文
posted @ 2014-06-30 10:52 marco_tan 阅读(404) 评论(0) 推荐(0)