Sample 3
Sample 3
(viii) Which of the following will return the last element of a list L with 6 elements?
(A) L(6) (B)L[5] (C) L[6] (D)L[-6]
(xiii)________is a field in a database table (or a combination of fields ) that has a unique value.
(A) A foreign key (B) A primary key (C)An identifier (D)A candidate key
(xiv)How do you select only one column ‘Name’ from a table named ‘Employee’?
(A) Select {all] from Employee; (B) Select ‘Name’ from Employee; (C) Select Name from
Employee; (D) Select from Employee Name;
(xvi)How would you display all those rows from a table named “Friends’ where the value of the
column ‘Hobbies’ is not ‘Swimming’?
(A) select all from Friends where hobbies is ‘Swimming’;
(B) select * from Friends where hobbies != ‘Swimming’;
(C) select all from Friends where hobbies is not ‘Swimming’;
(D) (D) select * from Friends where hobbies is <>‘Swimming’;
(xvii) How do you select all the rows from a table named ‘Student’ where the value of the column
‘FName’ starts with ‘K’?
(A) select * from Student where FName like ‘K___’;
(B) select * from Student where FName = ‘K’;
(C) select * from Student where FName like ‘K%’;
(D) (D) select * from Student where FName like ‘%K’;
(xviii) The data types CHAR(n) and VARCHAR(n) are used to create_______ and
_______types of string /text fields in a database,
(A) Fixed, equal (B) Equal, variable (C) Fixed, variable (D) Variable ,equal
(ii) Define the terms Degree and Cardinality of table with example. 2