- 所属分类:网站建设知识
- 作者: 独占网络
- 更新时间: 2015-3-17 10:13:44
- 返回列表
1、查询经过计算的列,查询员工的年龄
select 2015-age from users
2、设置字段别名
select 2015-age as '年龄' from users
3、限制返回行数
select top 10 * from users
4、消除重复的行
select distinct age from users
5、联表查询
select users.age,pc.info from users left join pc on users.typeid = pc.id
如有不懂找,深圳网站建设:独占网络