MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which query would return only the fields DesignerID and Designer?
A
SELECT * FROM Designers
B
SELECT DesignerID, Name FROM Designers
C
SELECT DesignerID AND Designer FROM Designers
D
SELECT DesignerID, Designer FROM Designers
Explanation: 

Detailed explanation-1: -SELECT. This keyword is used to select the data from the database or table. The ‘*’ is used in the select statement to select all the columns in a table.

Detailed explanation-2: -The SELECT statement is the most commonly used command in Structured Query Language. It is used to access the records from one or more database tables and views.

Detailed explanation-3: -In SQL we can retrieve data from multiple tables also by using SELECT with multiple tables which actually results in CROSS JOIN of all the tables. The resulting table occurring from CROSS JOIN of two contains all the row combinations of the 2nd table which is a Cartesian product of tables.

There is 1 question to complete.