Tag: databases

Questions Related to databases

  1. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

  2. SELECT * FROM Persons WHERE FirstName<>'Peter'

  3. SELECT [all] FROM Persons WHERE FirstName='Peter'

  4. SELECT * FROM Persons WHERE FirstName='Peter'


Correct Option: D
  1. SELECT * FROM Persons WHERE FirstName LIKE '%a'

  2. SELECT * FROM Persons WHERE FirstName='%a%'

  3. SELECT * FROM Persons WHERE FirstName='a'

  4. SELECT * FROM Persons WHERE FirstName LIKE 'a%'


Correct Option: D

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

  1. True

  2. False


Correct Option: B

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

  1. SELECT * FROM Persons SORT BY 'FirstName' DESC

  2. SELECT * FROM Persons SORT 'FirstName' DESC

  3. SELECT * FROM Persons ORDER BY FirstName DESC

  4. SELECT * FROM Persons ORDER FirstName DESC


Correct Option: C

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

  1. OPEN

  2. EXTRACT

  3. SELECT

  4. GET


Correct Option: C

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

  1. UPDATE

  2. MODIFY

  3. SAVE

  4. SAVE AS


Correct Option: A

AI Explanation

To answer this question, you need to understand the basic SQL syntax and operations.

The correct answer is A) UPDATE.

Explanation for each option:

A) UPDATE - This option is correct. The UPDATE statement is used to modify or update existing data in a database table.

B) MODIFY - This option is incorrect. The MODIFY statement is not a valid SQL statement for updating data. It is typically used in conjunction with the ALTER TABLE statement to modify the structure or definition of a table.

C) SAVE - This option is incorrect. The SAVE statement is not a valid SQL statement for updating data. SQL does not have a specific statement for saving data in a database.

D) SAVE AS - This option is incorrect. The SAVE AS statement is not a valid SQL statement for updating data. SQL does not have a specific statement for saving data with a new name or as a copy.

In conclusion, the correct answer is A) UPDATE. This statement is used to modify or update existing data in a database table.

  1. ADD NEW

  2. INSERT INTO

  3. ADD RECORD

  4. INSERT NEW


Correct Option: B

What does SQL stand for?

  1. Strong Question Language

  2. Structured Query Language

  3. Structured Question Language

  4. Strong Query Language


Correct Option: B
  1. SELECT * FROM Persons

  2. SELECT [all] FROM Persons

  3. SELECT Persons

  4. SELECT FROM Persons


Correct Option: A
  1. SELECT DIFFERENT

  2. SELECT UNIQUE

  3. SELECT DISTINCT

  4. SELECT EXACT


Correct Option: C