Correct option is B
The correct SQL command to display a list of tables in a database is SHOW TABLES;. This command is used in MySQL and other relational databases to list all the tables in the current database.
Important Key Points:
1. SHOW TABLES Command: The SHOW TABLES; command lists all the tables present in the currently selected database.
2. Usage of SHOW: The SHOW keyword is used to display various types of database information, including tables, columns, and indexes.
3. Correct Syntax for Listing Tables: The correct SQL syntax for displaying tables in a database is: SHOW TABLES;
Knowledge Booster:
· DISPLAY TABLES: This is not a valid SQL command. DISPLAY is not used to list tables in SQL. The correct command is SHOW TABLES;.
· SELECT TABLES: This is incorrect because SELECT is used for querying data from a table, not for listing tables in a database.
· VIEW TABLES: There is no VIEW command for displaying tables. The VIEW keyword is used to create virtual tables in the form of views, not to display a list of tables.