Que# Question Text Correct Answer: English
Que# Question Text Correct Answer: English
Which statement is used to delete all rows in a table without having the action
4 logged? TRUNCATE
Identify the correct SQL query to create an "employee" table having 2 fields : 'id'
and 'name' with following constraints/features : <br> CREATE TABLE employee
- 'id' is integer, primary key and should support automatically generated (id INTEGER
sequential values if user does not supply input for this during data insertion. <br> auto_increment, name
- 'name' is varchar(50) and should not allow duplicate values for different VARCHAR(50) UNIQUE
employees.<br> NOT NULL, PRIMARY
5 Also, it should not allow NULL values. KEY(id));
Page 1
English
Page 2
English
Customers<br>
--------<br>
CustIdNameCityState <br>
10001Arun <br>
10002ResmiChennaiTN <br>
10003ShajuKochiKerala <br>
10004Kiran <br>
10005AjayTrivandrumKerala <br>
10006Naveen <br>
10007AnitaTrivandrumKerala<br><br> UPDATE Customers SET
city='Chennai' and
Identify the SQL query to update all customers whose city and state is empty as state='TN' WHERE city IS
10 'Chennai' and 'TN' respectively. NULL AND state IS NULL
SELECT * FROM hospital
Identify the correct SQL query to select all wards from hospital table where
WHERE population
population is in the range of 100 to 200.
11 BETWEEN 100 AND 200;
SELECT * FROM student
A student table has 3 columns : rollno, name and marks. Identify the correct SQL WHERE name LIKE 'S%'
query to select all students whose name start with 'S'. The data should be sorted ORDER BY name DESC ;
12 in descending order of name.
Page 3
English
Page 4
English
Consider the two tables below. Identify the SQL query to retrieve all types that were part of
Aurelia brand<br/>
Items Table<br/>
<pre>
IdType Brand<br/>
---------------------------------------<br/>
1Kurtas 2 <br/>
2Kur s1 <br/>
3Dupa as 3 <br/>
4Stals3 <br/>
5Shawls4 <br/>
6Pants4 <br/>
<pre>
BrandNew Table<br/>
<pre>
IdName <br/>
-----------------------<br/>
SELECT Items.Type FROM
1W <br/>
2Biba <br/>
Items JOIN BrandNew ON
3Aurelia <br/> Items.Brand =
4 Zara <br/> BrandNew.ID WHERE
15 <pre> Items.BRAND=3;
Page 5
English
A college wants a database to keep track of the students and their enrollment to
different courses. A student might enroll to many courses and one course might
be enrolled by many students. The enrollment date is also recorded. How many
tables do you need to create to store the data provided your tables are in 3rd
16 Normal Form? 3
17 Which of these is not an advantage of Normalization None of these
18 SQL Server has mainly how many types of views? two
19 Which column attribute provides unique numbers for identification? AUTO_INCREMENT
The value of recently generated sequence number can be obtained by
20 ____________ LAST_INSERT_ID()
Page 6