1.SELECT 语法
1).SELECT 列名称 FROM 表名称
SELECT LastName,FirstName FROM Persons
2).SELECT * FROM 表名称
mysql> select * from mytable;
3).Select+where条件
select Name,age from mytable where age >=20 and age <=25 addre = ‘gucheng’;
或select * from mytable where age >=20 and age <=25 addre = ‘gucheng’;
4).Select+where+like条件
select Name from mytable where Name like 'y%' or Name like 'n%';
或select Nam* from mytable where Name like 'y%';