12 lines
231 B
MySQL
12 lines
231 B
MySQL
|
use studb;
|
|||
|
|
|||
|
-- 从多个表中查询数据时,如果存在相同的字段时,字段名前必须加表名
|
|||
|
select distinct t1.sid
|
|||
|
from t_stu t1, t_stu t2;
|
|||
|
where t1.sid > 2 and t2.sid > 3;
|
|||
|
|
|||
|
/*
|
|||
|
对7案例的改写,去重
|
|||
|
*/
|
|||
|
|