De Thi Thuc Hanh Sql

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View De Thi Thuc Hanh Sql as PDF for free.

More details

  • Words: 235
  • Pages: 3
Đề thi thực hành môn SQL Server 2005 Lớp C0707L Ngày 02-22-2008 Bài thi lưu vào 1 file duy nhất Shop.sql Sử dụng truy vấn TSQL thực hiện các yêu cầu sau: 1. Tạo ra database Shop 2. Trong database Shop tạo ra các bảng theo mô tả sau:

Bảng Item: - itemCode: primary key identity(1,1) - Qih: constraint: Qih>=0 Bảng Order_master: - OrderID: primary key identity(1,1) - CustCode: foreign key references to Customer table Bảng Order_details: - OrderID: foreign key ref to Order_master table - ItemCode: foreign key ref to Item table 3. a. add constraint to table Item ensure ReOrdLvl > Qih

b. add new column CustEmail varchar(100) on table Customer has constraint unique

4. Nhập dữ liệu cho các bảng như sau: --Bảng Item:

5. Thực hiện các truy vấn a. Show details 50 percent of table Item b. Show --details of item is the best selling ( max of amount) c. Show --details of customer has biggest Order (amount*price) d. e. f. g.

--details for all --details of item --average payment --itemcode of all

Order (Order_master) in current month has lowest price of the orders item has been ordered

h. --save in data in table item to backup table named Item_bk i. --update table item set Qih value of all Intel Core 2 Duo item to 100 (Exxxx) j. --report number order per Customer in two month 1,2 of current year

Related Documents

De Thi Thuc Hanh Sql
November 2019 9
Thuc Hanh Java
November 2019 24
Thuc Hanh Excel
November 2019 24
Bai Thuc Hanh 1
November 2019 26
Thuc Hanh Vba
November 2019 18