⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exam1myself.txt

📁 ssd7考试exam1,绝对有用~欢迎下载
💻 TXT
字号:
/*
*@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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -