查詢課程表C中課程名和學分
Ⅰ sql語言:請用兩種方法實現查詢哪些課程的學分與C語言的學分相同,返回課程名稱和學分
select 課程名稱,學分 from kecheng a join kecheng b on a.學分=b.學分 where b.課程名稱版='C語言權' and a.課程名稱<>'C語言'
select 課程名稱,學分 from (select * from kecheng where 課程名稱='C語言') a join (select * from kecheng where 課程名稱<>'C語言') b on a.學分=b.學分
Ⅱ 資料庫請用SQL語句寫下列問題,圖如下第一個表為課程表C第二個為學生修課表S第三個為學生表SC,發私信
發不了私信,需要的話,我正好練練手
Ⅲ 如何查詢課程名中含有「學」的課程名稱和學分數,並按學分降序排列
select * from table where 課程名稱 like '*學*' order by 學分數 desc
祝好運,望採納
Ⅳ 查詢課程表中學分在3分以上的課程信息,並按學分降序排列
呃,課程表是按照信息的,嗯,表格的形式下發下來的,當然是可以按照降序排列的。
Ⅳ 大學資料庫題 ,建立一個課程表C,有課程號Cno,課程名稱Cn,學分xf,課時ks,課程類型
create table t_C (cno int primary key auto increment,
cn varchar(20),
xf int(11),
ks int(11),
kl varchar(30));
cno int primary key auto是設置cno為主鍵並且自增
Ⅵ 根據學生表,課程表和成績表,查詢學生的學號,姓名,課程號,課程名和分數。(多表查詢
直接將三表關聯查詢就可以了 select b.姓名,c.課程,a.成績 from 成績專表 a,學生表屬 b,課程表 c where a.學生學號 = b.學號 and a.課程編號 = c.編號 and a.成績 < 60
Ⅶ sql查詢語句的問題,「列出成績大於90的所有學生的姓名、專業、課程名稱、成績」這條語句怎麼寫
可以參考下面的代碼:
select s.姓名, s.專業, sc.成績, c.課程名稱
from 學生基本情況表 s, 成績表 sc, 課程表 c
where s.學號 = sc.學號 and c.課程編號 = sc.課程編號
and sc.成績 > 90
(7)查詢課程表C中課程名和學分擴展閱讀:
sql語句
刪除列:
Alter table table_name drop column column_name--從表中刪除一列
添加主鍵:
Alter table tabname add primary key(col)
平均:
select avg(field1) as avgvalue from table1
最大:
select max(field1) as maxvalue from table1
Ⅷ SQL命令 「學生」資料庫中有 「學生表」、「課程表」和 「成績表」。 「學生表」中包含學號、姓名
1、首先在電腦上打開資料庫軟體。然後附加有學生表和成績表的資料庫。
Ⅸ 用SQL語句怎樣在課程表中,查詢出課程名中含有『數據』的課編號及課程名
SELECT CourseId,CourseName FROM Course WHERE CourseName like '%數據%'
Ⅹ 學生—課程」資料庫中包含學生表、課程表、學生選課表3個表
看一下。等下寫寫。內
1.
select sno, ssex from student where
sname like '王%'
2.
select sname from student where
sname not like '劉容%'
3.
select sname from student where
sage <20
4.
select sage from student order by sage asc
5. select count(*) from student where sno in (
select sno from sc)