求資料庫查詢語句 設有兩個基本表R(A,B,C)和S(D,E

2021-04-12 21:20:46 字數 2673 閱讀 4978

1樓:匿名使用者

1) select a from r

2) select * from r where b = '17'

3) select a, b, c, d, e, f from a, b

4) select a, f

from r, s

where c = d

2樓:匿名使用者

select * from a where id<>fatherid and id=?

求解資料庫查詢語句:設有兩個基本表r(a,b,c)和s(d,e,f),試用sql查詢語句表達下列關係代數表示式

3樓:匿名使用者

(1)π

zhia(r)

daoselect a from r

(2)σ

專b='17'(r)  select * from r where b=17

(3)r×s  屬select * from r across s(4))πa,f(σc=d(r×s)) select a , f from r join s on c=d

設有兩個基本表r(a,b,c)和s(a,b,c)試用sql查詢語句表達下列關係代數表示式:

4樓:匿名使用者

rus select * from a,s

r∩s select * from a,s where a.列名=s.列名

r-s 這個不懂是什麼意思,你解釋下,我再給你補充

設有兩個關係r(a,b,c)和s(c,d,e),試用sql查詢語句表達下列關係代數表示式

5樓:初見

只需要select a,e from r,s where b=d就可以了

這是等值連線 不是自然連線

6樓:匿名使用者

select a,e from r,s where b=d

有兩個關係s(a,b,c,d)和(c,d,e,f),寫出與下列查詢等價的sql表示式 5

7樓:

select*from s   where a=10select a,b from s

select a,b,s.c,s.d,e,f from s,t     where s.c=t.c and s.d=t.d

select s.*,t.* from s,t    where s.c=t.c

select s.*,t.* from s,t  where aselect s.c,s.d,t.* from s,t

8樓:匿名使用者

解:(1)select * from s where a='10';

(2)select a,b from s;

(3) select a,b,s.c,s.d,e,f from s,t where s.c=t.c and s.d=t.d;

(4)select * from s,t where s.c=t.c;

(5) select * from s,t where s.a

(6) select s.c,s.d,t.* from s,t ;

9樓:繆輝

1、σa=10(s)

select * from s where a=102、πa,b(s)

select a,b from s

3、πc,d(s)*t

select * from s,t where t.c=s.c and t.d=s.d

只知道三個,

專不好意思屬

10樓:無敵十五寶寶

(4)select*

from s,t

where s.c=t.c

(5)select*

from s,t

where s.a<t.e

(6)select s.c,s.d,t*

from s,t

試用sql查詢語句表達學生-課程資料庫中3個基本表s,sc,c的查詢

11樓:匿名使用者

你提供bai的資訊du

不全,從zhi

第三題開

dao始沒辦法作內

答了。容。

create table sc

(sno int not null,

cno nvarchar(50) not null,grade nvarchar(50) not null)goselect * from course where cname like 'mis%' and left(right(cname,2),1)='系'

select count(*) from course

設有兩個關係r(a,b,c)和s(c,d,e),用sql查詢語句表達下列關係代數表示式 ,求高手解答

12樓:jpg嘰嘰喳喳

select r.a,s.e from r,s where b=50 and r.

c=s.c union select r.a,s.

e from r,s where b=60 and r.c=s.c

我要在access資料庫的兩個表中計算兩個數量欄位的和

sql多表查詢 例子 如果兩個表只是其中一個欄位有關聯 select from 表a,表b where 表a.欄位 表b.欄位 如果2個表的結構一摸一樣 select from 表aunion select from 表bwhere條件 不知道你是要在某程式中實現,還是想用sql語句實現?若是想在某...

MYSQL中同資料庫中的兩個表中的資料怎樣合併? 只需要合併某個欄位。

username 欄位 是否是唯一欄位 如果是唯一欄位可以使用左連線的方式 update aaa 表 或bbb 表 update aaa left join bbb on bbb.username aaa.username set aaa.post aaa.post bbb.post.或者 upda...

SQL怎麼查詢兩個表中不同的資料

我們需要準備的材料分別是 電腦 sql查詢器。1 首先,開啟sql查詢器,連線上相應的資料庫表,以查詢c1表和c2表的name欄位不同為例。2 點選 查詢 按鈕,輸入 select c1.name from c1 left join c2 on c1.name c2.name where c2.na...