Multiple choice technology databases

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

  1. SELECT [all] FROM Persons

  2. SELECT Persons

  3. SELECT *.Persons

  4. SELECT * FROM Persons

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

To select all columns from a table in SQL, use the asterisk (*) wildcard with 'SELECT * FROM table_name'. Option A '[all]' is invalid SQL syntax. Option B 'SELECT Persons' would cause an error - it's interpreted as selecting a column named 'Persons', not the table. Option C 'SELECT *.Persons' is invalid syntax. Option D correctly uses the standard SQL wildcard syntax.