CONSTRAINT <外键名前缀> FOREIGN KEY <表中的键名> REFERENCES <引用的表名> (<引用的字段>);@H_404_0@
SELECT * FROM t_student WHERE class = (SELECT id FROM t_class WHERE name = ‘A’);@H_404_0@
SELECT ts.name sname,tc.name cname FROM t_student ts,t_class tc WHERE ts.class = tc.id AND tc.name = 'A';