1.先从查询表结构开始吧:
desc table(表名)
2.查询一个表中全部数据;
select * from table(表名),不建议使用*。效率低还耗时;
3.查询表中部分列;
select (字段名)from table (表名) ,最常用;
4.查询空值
select * from table where 字段名 is null,(一定是 is 不能为=)
5.在查询过程中可使用“||”来连接字符串和字段间形成一个想要的语句或其他;(这个挺有意思的)
比如:select stuName || ‘的性别是’ || sex from Stu_table where Class = 1;