MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which SQL query would display all pupils surnames and registration class?
A
SELECT * FROM Pupils
B
SELECT * FROM Pupils WHERE surname, regiClass
C
SELECT surname, regiClass
D
SELECT surname, regiClass FROM Pupils
Explanation: 

Detailed explanation-1: -SELECT statement uses * character to retrieve all records from a table, for all the columns. The above query will show all the records of student table, that means it will show complete dataset of the table.

Detailed explanation-2: -The ORDER BY command is used to sort the result set in ascending or descending order. The ORDER BY command sorts the result set in ascending order by default. To sort the records in descending order, use the DESC keyword.

Detailed explanation-3: -With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”? Explanation: The SQL LIKE clause is used to compare a value to similar values using wildcard operators. 3.

There is 1 question to complete.