0% found this document useful (0 votes)
3 views

Questions

Uploaded by

gargi0
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Questions

Uploaded by

gargi0
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Question 1.

Write the output of the following SQL queries:


(i) SELECT RIGHT (‘software’, 2);
(ii) SELECT INSTR (‘twelve’, lV);
(iii) SELECT DAYOFMONTH (‘2014-03-01’);
(iv) SELECT (76.987,2); (All India 2014C)

Question 2.
There is a column Salary in a Table EMPLOYEE. The following two
statements are giving different outputs. What may be the possible
reason? (Delhi2013)

SELECT COUNT(*) FROM EMPLOYEE;


SELECT C0UNT(Salary) FROM EMPLOYEE;

Question 3.
A table FLIGHT has 4 rows and 2 columns and another table AIRHOSTESS has
rows and 4 columns. How
many rows and columns will be there if we obtain the cartesian product of these
two tables? (Delhi 2012)

1. Top display records from the table STUDENT in alphabetical order as per the name of the
student.
2. To display Class, DOB and City whose marks is b/w 450 and 550.
3. To display Name, Class and total number of students who have scored more than 450 marks,
class wise.

Question 5:- Write an SQL command to remove the Primary Key constraint from a table, named
MOBILE. M_ID is the primary key of the table.

Question 6:- Write an SQL command to make the column M_ID the Primary Key of an already
existing table, named MOBILE.
Question 7:- Consider the table ORDERS as given below

A) Write the following queries:

(I) To display the total Quantity for each Product, excluding Products with total Quantity less than
(II) To display the orders table sorted by total price in descending order.

(III) To display the distinct customer names from the Orders table.

You might also like