使用select查询语句
语法:select<列名>from<表名>[where<查询条件>] [order by<排名的列名>][ ASC 或 DESC]
使用where过滤部分行数据:
select AuthorName ,Email,Age
from Authors
where City=‘北京’
使用As字句将列转别名:
select AuthorName as ‘作者姓名’ ,Email as‘电子邮件’ ,Age as ‘年龄’
from Authors
使用“+”连接多个字段,合并成一列:
select AuthorName + ‘ ’ + City as 作者居住城市
from Authors
使用 Top 关键字查询表中限定行数:
select top *5 from Authors