menghaoran
人都会死,但不是每个人都真正活过!
摘要: 因为需要一个查询语句,能同时从三张表中查询一个相同字段的值,只查出来一次即可,这三张表除了这个列名称一致以外,其它没有任何关系,因为只查询一个结果,所以用到了if else,刚开始以为是if exists ,检查这个值是否存在,后来发现exsits是查询这个列是否存在,如下:if exists (select studentType from dbo.StudentGrow_HealthDiseasesRecord)select studentType from dbo.StudentGrow_HealthDiseasesRecordelse if exists (select stu... 阅读全文
posted @ 2013-10-18 13:54 menghaoran 阅读(862) 评论(0) 推荐(0) 编辑