MCQs – SQL Basics

Q) What does below SQL statement describe?

SELECT CustomerName, Address + ‘, ‘ + City + ‘, ‘ + Country AS Address

FROM Customers;

  1. Alias named Address column will be created and under this Address, City and Country will be printed as combined statement.
  2. Alias named Address will be created for Country columns
  3. Alias named Address column will be created and under this all CustomerName, address, city and country will be printed as combined statement
  4. All above options are wrong

Answer: 1


Q) Logical operators used in SQL are

  1. AND, OR , NOT
  2. &&, ||, !
  3. $,|,!
  4. None of the above

Answer: 1



Q) To specify the number of records to return, which keyword is used

  1. FIRST
  2. TOP
  3. START
  4. ROW

Answer: 2
To return specific number of records, SQL Server uses TOP, MYSQL database uses LIMIT and Oracle database uses ROWNUM.


Q) To search for a specified pattern in a column

  1. SQL MATCH
  2. SQL LIKE
  3. SQL PATTERN
  4. SQL SEARCH

Answer: 2


Q) Which clause is used to combine rows from two or more tables based on a related column between them.

  1. SQL MATCH
  2. SQL JOIN
  3. SQL PATTERN
  4. NONE

Answer: 2


Related Posts