The questions can come in any order, so make sure you are selecting right option for all questions.
Which of the following query is correct to fetch all the employee details from the employee table(a) select * from employee;
(c) SELECT ename, sal+1000 FROM emp;
(b) NO
(c) SELECT FirstName FROM Persons
from college;
Here which of the following displays the unique values of the column ?
(c) Distinct
SELECT DISTINICT emp_id
FROM employee;
(b) [1,2,3,5,6,7,8]
(a) SELECT DISTINCT
(a) specify what table we are selecting or deleting data FROM
1001 Annie 6000
1009 Ross 4500
1018 Zeith 7000
above are the Employee table details.
select employee_id from employee order by employee_id desc;
Which of the following output will be true?
(a) 1018,1009,1001
All the questions are related to the ER Diagram displayed below: College Management System
Question 1Choose the query to display names of the department in the college ordered in department_name in ascending order.
(a) select department_name from Department order by department_name asc;
What will be the result of below query, if the question is to display entire details present in Student table ordered in descending order based on student id.
select student_id, student_name, address, city, department_id from Student order by student_id;
(a) Wrong Answer
Fill the blank space, such that below query is used to display entire details present in Student table ordered in descending order based on student id.
select * from _____ order by student_id ______;
(b) Student, desc
Fill the blank space, such that below query is used to display the unique city details present in Student table.
select ______ city from Student;
(a) distinct
Choose the query to display entire details of the Subject table sorted in ascending order based on subject_id and then in descending order based on staff_id.
(b) select * from Subject order by subject_id, staff_id desc;