MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following query contains error?
A
SELECT * FROM Emp WHERE Empid=1001;
B
SELECT Empid FROM Emp WHERE Empid=1001;
C
SELECT Empid FROM Emp;
D
SELECT Empid WHERE empid=1001;
Explanation: 

Detailed explanation-1: -Explanation: The statement Select empid where empid = 10009 and last name = ‘GELLER’; does not mention the table name from where the data should be queried.

Detailed explanation-2: -Which one of the following given statements possibly contains the error? The Query given in option D does not contain the “from” clause, which specifies the relation from which the values have to be selected or fetched. Therefore the correct answer is D.

Detailed explanation-3: -The correct answer to the question “Which of the SQL statements is correct” is option (b). SELECT Username, Password FROM Users. And all the other options are incorrect.

There is 1 question to complete.