多表查询—内连接--mysql教程基础知识

时间:2024-05-13 13:39:03
【文件属性】:

文件名称:多表查询—内连接--mysql教程基础知识

文件大小:3.2MB

文件格式:PPT

更新时间:2024-05-13 13:39:03

基础知识

多表查询—内连接-1 SELECT S.SName,C.CourseID,C.Grade From Sc AS C INNER JOIN Students AS S ON C.StudentID = S.SNo StudentsID CourseID Grade 1 2 2 3 001 001 002 002 97 89 67 76 3 003 81 Sc 猜一猜:这样写,返回的查询结果是一样的吗? SELECT S.SName,C.CourseID,C.Grade From Students AS S INNER JOIN Sc AS C ON C.StudentID = S.SNo 再猜一猜:以下返回多少行? SELECT S.SName,C.CourseID,C.Grade From Students AS S INNER JOIN Sc AS C ON C.StudentID <> S.SNo SName 梅超风 陈玄风 陆乘风 曲灵风 SNo 1 2 3 4 Stundents SName 梅超风 陈玄风 陈玄风 陆乘风 CourseID Grade 001 001 002 002 97 89 67 76 陆乘风 003 81 查询结果


网友评论