学习的文章地址
Mysql 学习记录子查询重点记录
from 语句是足行允许,一行运行了之后在查询第二行。where 后面的参数是前面的from语句查询出来的,所以这一段都算是一个字查询:(select id,name from tableName) as 别名必须要些 where id=3 and name =4;
select col from (select id,name from tableName) as 表的别名必须要 where id=3 and name =4;
例子: select PLAYERNO from (select PLAYERNO,SEX from PLAYERS) as PLAYERNOname where SEX='M' and PLAYERNO < 10;
where 语句也是足行查询
SELECT playe......
查看更多