Revision Worksheet 1
Revision Worksheet 1
1. Differentiate between
(i) Char( ) and Varchar( ) datatype in SQL.
(ii) DDL and DML commands in SQL.
(iii) ROUND() and TRUNCATE() functions
(iv) DROP and DELETE command
(v) ORDER BY and GROUP BY clause
(vi) Candidate Key and Alternate Key
2. Define the terms and label it in a relation.
(i) Entity
(ii) Degree
(iii) Cardinality
(iv) Tuple
(v) Attribute
(vi) Domain
(vii) Candidate Key
(viii) Primary Key
(ix) Alternate Key
3. Write output for the following statements
(i) SELECT ROUND (37126.23 , -3) ;
(ii) SELECT POW (4 , -3);
(iii) SELECT MOD (17 ,5);
(iv) SELECT TRUNCATE(389.23,2);
(v) SELECT MOD(10.5,3);
4. Write SQL commands on the basis of EMPLOYEES relation given below: