语法:
Select [distinct]*|列名,列名 from 表[where 条件];
例子:
1、用表别名——应用于多表查询:
Select * from student as s;——as可以省略
2、用列别名:
Select name as user from student;
3、用Distinct查询不重复的记录:
select distinct(age) from student;
语法:
Select [distinct]*|列名,列名 from 表[where 条件];
例子:
1、用表别名——应用于多表查询:
Select * from student as s;——as可以省略
2、用列别名:
Select name as user from student;
3、用Distinct查询不重复的记录:
select distinct(age) from student;