Mysql-select查询数据
-- 查询所有列
-- select * from 表名
select * from student;
-- 指定条件查询
select * from student where id=4;
-- 查询指定列
-- select 列1,列2,…… from 表名
select name,high from student where gender="男";
-- 可以使用as为列或者表指定别名
select name as "名字",high as "身高" from student where gender="男";
-- 字段顺序
select high,name from student;
表取自:
浙公网安备 33010602011771号