MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Return only the customers who have ER anywhere in their last name.
A
last ____ name LIKE “%er%”
B
last ____ name = “%er”
C
last ____ name = “%er%”
D
last ____ name LIKE “%er”
Explanation: 

Detailed explanation-1: -The SELECT DISTINCT statement is used to return only distinct (different) values.

Detailed explanation-2: -SQL count function: It is used to count the number of records in the selected table. It is used with the SELECT statement. Here table name is given as persons.

Detailed explanation-3: -3. With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”? Explanation: The SQL SELECT statement queries data from tables in the database.

Detailed explanation-4: -With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter"? SELECT * FROM Persons WHERE FirstName=’Peter’; With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” starts with an “a"?

There is 1 question to complete.