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

  1. FETCH

  2. GET

  3. SELECT

  4. EXTRACT


Correct Option: C

AI Explanation

To answer this question, you need to understand SQL (Structured Query Language), which is a programming language used for managing and manipulating relational databases.

Let's go through each option to understand why it is correct or incorrect:

Option A) FETCH: The FETCH statement is used in SQL to retrieve rows from a cursor and move the cursor position to the next row. It is not used to extract data from a database directly.

Option B) GET: The GET statement is not a valid SQL statement for extracting data from a database. There is no GET statement in SQL.

Option C) SELECT: The SELECT statement is the correct SQL statement used to extract data from a database. It is used to retrieve data from one or more tables in a database based on specified conditions.

Option D) EXTRACT: The EXTRACT statement is used in SQL to extract parts of a date or time value, such as extracting the year or month from a date. It is not used to extract data from a database directly.

The correct answer is C) SELECT. This option is correct because the SELECT statement is the primary SQL statement used for extracting data from a database.

Find more quizzes: