MCQ of Structured Query Language(SQL) With Answer Set -2
1. Which of the following query is correct for using comparison operators in SQL ? A) SELECT sname, coursename FROM studentinfo WHERE age>50 and <80; B) SELECT sname, coursename FROM studentinfo WHERE age>50 and age <80; C) SELECT sname, coursename FROM studentinfo WHERE age>50 and WHERE age<80; D) None of the above 2.How to select all data from studentinfo table starting the name from letter 'r'? A) SELECT * FROM studentinfo WHERE sname LIKE 'r%'; B) SELECT * FROM studentinfo WHERE sname LIKE '%r%'; C) SELECT * FROM studentinfo WHERE sname LIKE '%r'; D) SELECT * FROM studentinfo WHERE sname LIKE '_r%'; 3. Which of the following SQL query is correct for selecting the name of staffs from 'tblstaff' table where salary is 15,000 or 25,000? A) SELECT sname from tblstaff WHERE salary IN (15000, 25000); B) SELECT sname from tblstaff WHERE salary BETWEEN 15000 AND 25000; C) Both A and B D) None of the above 4. The SELECT