Professional Documents
Culture Documents
Sample Paper Xi Ip Pt2
Sample Paper Xi Ip Pt2
1
4. Consider the following table ‘BOOK’ and write output of the given queries 2
5. Consider the following table ‘CITY’ and write output of the given queries 2
CITYCODE CITYNAME
200 Jabalpur
110 Anuppur
275 Chhindwara
230 Balaghat
174 Dewas
i) SELECT * FROM CITY ORDER BY CITYNAME;
ii) SELECT * FROM CITY ORDER BY CITYCODE DESC;
SECTION ‘B’
6. Differentiate between 6
a) Primary Key and Foreign Key
b) Degree and Cardinality of a relation
c) NOT NULL constraint and UNIQUE constraint
7. Write SQL command to create a table ‘TEACHER’ with the following specifications 3
Name of Attributes Data Type Size Constraint
TeacherID INT 5 Primary Key
TName VARCHAR 30
Age INT 2
Department VARCHAR 30
Salary FLOAT
8. Consider a table ‘ITEM’ with the attributes (ItemCode, ItemName). Write SQL command 3
to:
i) Add new column ‘ItemPrice’ with data type ‘int’.
ii) Show a description of table ‘ITEM’
iii) Remove the column ‘ItemName’.
SECTION ‘C’
9. Differentiate between 4
i) DROP TABLE and DELETE command in SQL
ii) CHAR and VARCHAR data type in SQL
10. Explain 4
i) How we can insert a record in a table using SQL command? Give example.
2
ii) What is the use of ‘update’ command in SQL? Give example.
11. Consider the following table ‘CUSTOMER’ and write output of SQL queries for (i) to (iv) 4