读书人

sql查询数据引见

发布时间: 2013-11-08 17:51:58 作者: rapoo

sql查询数据介绍

sql查询数据表数据sql语句查询数据表数据是通过select语句实现的基本语法:select * from 表名例如:查询user表中的数据select * from user;sql语句查询指定字段基本结构:select 字段名称... from 表名例如:查询表user中的name字段select name from user;使用列别名查询sql语句的列别名是通过as实现的。select 字段名 as 列别名 from 表名例如:select name as 用户名称 from user;查询不重复的数据distinct基本语法:select distinct 字段名称 from  表名例如:查询名称不重复的数据select distinct name from user;

转载于:59biye网 的http://www.59biye.com/sql/cont/pid/223/id/238.shtml

读书人网 >SQL Server

热点推荐