+

SQL objective interview questions and answers

What does SQL stand for?

  • Structured Query Language
  • Structured Question Language
  • Strong Question Language

Show Answer

Which SQL statement is used to extract data from a database?

  • GET
  • OPEN
  • EXTRACT
  • SELECT

Show Answer

Which SQL statement is used to update data in a database?

  • SAVE AS
  • UPDATE
  • SAVE
  • MODIFY

Show Answer

Which SQL statement is used to delete data from a database?

  • COLLAPSE
  • DELETE
  • REMOVE

Show Answer

Which SQL statement is used to insert new data in a database?

  • INSERT INTO
  • ADD NEW
  • ADD RECORD
  • INSERT NEW

Show Answer

With SQL, how do you select a column named “FirstName” from a table named “Persons”?

  • SELECT FirstName FROM Persons
  • SELECT Persons.FirstName
  • EXTRACT FirstName FROM Persons

Show Answer

With SQL, how do you select all the columns from a table named “Persons”?

  • SELECT Persons
  • SELECT [all] FROM Persons
  • SELECT * FROM Persons
  • SELECT *.Persons

Show Answer

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’
  • SELECT [all] FROM Persons WHERE FirstName=’Peter’
  • SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’
  • SELECT * FROM Persons WHERE FirstName<>‘Peter’

Show Answer

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”?

  • SELECT * FROM Persons WHERE FirstName=’%a%’
  • SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
  • SELECT * FROM Persons WHERE FirstName=’a’
  • SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

Show Answer

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

  • True
  • False

Show Answer