Multiple choice technology databases

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

  1. SELECT * FROM Persons

  2. SELECT [all] FROM Persons

  3. SELECT Persons

  4. SELECT FROM Persons

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The asterisk (*) wildcard in SQL selects all columns from the specified table. Option D is invalid syntax (missing column names), and option C would produce an error because 'SELECT' requires a column list or *. Options B and A are incorrect - there is no 'all' keyword in SELECT statements.

AI explanation

The asterisk * in a SELECT statement is SQL shorthand meaning "all columns," so SELECT * FROM Persons retrieves every column for every row in the table. None of the other options use valid SQL syntax for selecting all columns.