摘要:
--传统写法declare @age intselect @age=age from StuInfo where StuName='张三'select * from StuInfo where Age>@age--子查询--子查询先执行"()"里面的查询再去执行父查询--子查询中如果使用的是比较运算符请确保它的返回值是一个select * from StuInfo where age> (select Age from StuInfo where StuName='张三')--常见的错误:--子查询和结果集比较select * f 阅读全文
posted @ 2012-03-07 16:06
傻笨猪
阅读(197)
评论(0)
推荐(0)

浙公网安备 33010602011771号