exam1myself.txt

来自「ssd7考试exam1,绝对有用~欢迎下载」· 文本 代码 · 共 73 行

TXT
73
字号
/*
*@author:wangzhesi
*053597
*/
****** 1 ******
1.
SELECT A
FROM R;

2.
SELECT *
FROM R
WHERE B = 13;

3.
SELECT A, B
FROM R, S
WHERE S.C = S.D;

****** 2 ******
1.
ename  	project  	          dept
Kasper      Spreadsheet        Admin
Mohan 	Spreadsheet       Admin
Lin 	Forecast 	          Admin
Lin 	Spreadsheet       Admin

2.
I think the operation cannot be performed,
because  the degrees of r and s are not the same.

3.
The result is empty.None of them is consilient, because the degree is not the same.

****** 4 ******
1.
ALTER TABLE ORDERS ALTER COLUMN Received SET NOT NULL;

2.
ALTER TABLE ORDERS ADD CHECK(Shipped is NOT NULL OR Shipped > Received);

****** 5 ******
1.
SELECT Pon
FROM PART
WHERE UnitPrice >= 10 AND UnitPrice <= 25;

2.
SELECT Pno, SUM(Qty) AS SUMQty
FROM INVOICE, ORDERS
WHERE INVOICE.Ono = ORDERS.Ono 
               AND Received <= to_date('31/Dec/1998','dd/mm/yy') 
               AND Received >= to_date('1/Jan/1998','dd/mm/yy')
GROUP BY Pno
ORDER BY SUM(BilledPrice) ASC;

3.
SELECT PART.*
FROM INVOICE, ORDERS, PART
WHERE INVOICE.Ono = ORDERS.Ono 
               AND INVOICE.Pno = PART.Pno
               AND Received >= to_date('31/Dec/1998','dd/mm/yy') 
               OR Received <= to_date('1/Jan/1998','dd/mm/yy');

****** 6 ******
ALTER TABLE EMPLOYEE ADD FOREIGN KEY(dname) REFERENCE  DEPARTMENT(name);






⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?