ssd7-exam1.txt
来自「Let the following relational tables be g」· 文本 代码 · 共 61 行
TXT
61 行
1.
1) select A
from R
2) select *
from R
where B=13
3) select R.A,R.B
from R,S
where R.c=S.D
-------------------------------------------------
2.
1)ename project dept
Kasper Spreadsheet Admin
Mohan Spreadsheet Admin
Lin Forecast Admin
Lin Spreadsheet Admin
2)The operation can not be performed, because table r and s have different number of columns
3)null
------------------------------------------------
3.
1)alter table ORDERS
alter column Received set not null
2)alter table ORDERS
add constraint CK_ORDERS check(Shipped>Received)
------------------------------------------------------
4.
1)select Pno
from PART
where UnitPrice>10 and UnitPrice<25
2)select INVOICE.Pno,INVOICE.Qty,INVOICE.Ono,INVOICE.BilledPrice
from INVOICE,ORDERS
where ORDERS.Recived like '%98' and INVOICE.Ono=ORDERS.Ono
group by Pno
order by BilledPrice
3)select *
from PART
where Pno in (select Pno
from INVOICE
where Ono in (select Ono
from ORDERS
where Recived not like '%98'
)
)
-------------------------------------------------------------------
5.
alter table EMPLOYEE
add constraint FK_EMPLOYEE_DEPARTMENT foreign key (dname)
reference DEPARTMENt (name) not null
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?