摘要:
http://blog.csdn.net/hliq5399/article/details/6313164 阅读全文
摘要:
http://www.open-open.com/lib/view/open1433387390635.html 阅读全文
摘要:
如果想要在去重后选出的数据中选出前三条,则应该将distinct写在top的前面,例如 SELECT DISTINCT TOP 3 USERNAME,PASSWORD FROM USERS WHERE SEX='男' 阅读全文
摘要:
如果数据库中存储的是字符类型的数据,筛选出来后如果需要进行转换float类型: convert(float,LOW) LOW代表要转换的数据 如果要将字符类型的数据转换成浮点型然后再保留两位小数: convert(decmal(18,2),convert(float,HIGH)) HIGH代表要转换 阅读全文
摘要:
exists : 强调的是是否返回结果集,不要求知道返回什么, 比如: select name from student where sex = 'm' and mark exists(select 1 from grade where ...) ,只要exists引导的子句有结果集返回,那么exi 阅读全文