一、SQL入门语句之SELECT
SELECT语句用于从数据库表中获取数据,结果表的形式返回数据。这些结果表也被称为结果集
1、从数据库表中取部分字段
select 字段A,字段B from table_name
2、从数据库表中取所有字段
select * from table_name
二、SQL入门语句之WHERE
WHERE用于指定从一个表或多个表中获取数据的条件。可用于UPDATE、DELETE等语句中。
1、按特定条件从表中读取数据
select * from table_name where condition