标签:from sql 查询 and birt sel 常用 HERE 一个
按返回结果分类:
SELECT playerno FROM (SELECT playerno, sex FROM players WHERE playerno < 10) AS players10 WHERE sex=‘M‘;
SELECT playerno FROM players WHERE (sex, town) = (SELECT sex, town FROM players WHERE playerno = 100);
SELECT playerno, name, town FROM players WHERE playerno IN (SELECT playerno FROM players WHERE sex = ‘F‘);
SELECT playerno FROM players WHERE year(birth_date) = (SELECT year(birth_date) FROM players WHERE playerno = 27) AND playerno <> 27;
SELECT * FROM t_blog JOIN t_type ON t_blog.typeId=t_type.id; SELECT * FROM t_blog,t_type WHERE t_blog.typeId=t_type.id;
SELECT * FROM t_blog LEFT JOIN t_type ON t_blog.typeId=t_type.id;
标签:from sql 查询 and birt sel 常用 HERE 一个
原文地址:https://www.cnblogs.com/waterystone/p/9715507.html