mysql测试通过作者: freedom_me 时间: 2012-4-11 14:23
刚试了试 4#的sql 还真可以耶.但是不知道怎么从两张表查询,不用关联关键字也行。。。
#select sc.sno,sc.sname,co.cname,sc.score from score as sc inner join course as co where sc.score>90 and sc.cno=co.cno;
CREATE TABLE course
(cno INT NOT NULL,
cname VARCHAR(255))
CREATE TABLE score
(sno INT NOT NULL,
sname VARCHAR(255),
cno INT,
score INT)
INSERT INTO course (cno,cname)
VALUES
(01,'数学'),
(02,'语文'),
(03,'化学')