1.别名查询,使用关键词as
select * from student as p;
列起别名:select name as ‘商品名’ ,price ‘价格’ from product;
去掉重复值:select distinct price from product;(去除price这一列重复的值)
select distinct * from student;(去除重复的行)
特殊使用:
select 6-2;
select 6/2;
微信扫一扫
1.别名查询,使用关键词as
select * from student as p;
列起别名:select name as ‘商品名’ ,price ‘价格’ from product;
去掉重复值:select distinct price from product;(去除price这一列重复的值)
select distinct * from student;(去除重复的行)
特殊使用:
select 6-2;
select 6/2;
相关推荐