MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What would this SQL query display? SQL * FROM Pupils
A
It would display pupils who have a * in their name.
B
It is not a SQL statement.
C
It would display all records from the Pupils table.
D
It would not display any 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 DISPLAY command must be placed immediately after the query statement on which you want it to take effect. For example: SELECT pno, pname FROM part WHERE color=’BLUE’; DISPLAY; When the system encounters this DISPLAY command, it displays the Result window containing the part number and name for all blue parts.

Detailed explanation-3: -You can list a table’s columns with the mysqlshow db name tbl name command. The DESCRIBE statement provides information similar to SHOW COLUMNS .

Detailed explanation-4: -The SQL SELECT statement is used to fetch the data from a database table which returns this data in the form of a result table.

There is 1 question to complete.