Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q-1. Which of the following queries are legal?

a) SELECT deptno, count(deptno) FROM emp GROUP BY ename;


b) SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;
c) SELECT deptno, avg(sal) FROM emp;
d) SELECT deptno, avg(sal) FROM emp GROUP BY deptno;

Q-2. Which of the following SQL operations demands the use of wild cards comparisons?

a) IN
b) BETWEEN
c) EXISTS
d) LIKE

Q-3 Indicate whether this statement is true or false. A foreign key column must contain unique
values.

a) True
b) False

Q-4 How many type of DBMS.

Q-5) Create a table named Mst_Item as per following details.

Column Name Data Type Size Constraint


Itemcode Alphanumeric 10 Primary key
Item Name String 50 Not Null
Description String 200
Price Number 6,2 Not Null
Sell_Price Number 8,2 Not Null
ReOrderLevel Number 2 Not Null
Qty Number 4 Not Null
IsDeleted Char 1 Check ['Y','N']
CreatedDT Date

Q-5) Insert 50 different items into the table.

Q-6) Create a table named Trn_Order as per following details.

Column Name Data Type Size Constraint


Orderno Alphanumeric 10 Primary Key
Customer_Name String 50 Not Null
Qty Number 3
Price Number 8,2 Not Null
PurchaseDate Date
Itemcode Alphanumeric 10 Foreign Key
(Reference)

Q-7) Insert 150 different record.

You might also like