Which SQL statement creates a new table?

Study for the SQL Basics Test. Improve your knowledge with multiple choice questions and detailed explanations. Prepare effectively to master SQL concepts!

Multiple Choice

Which SQL statement creates a new table?

Explanation:
Creating a new table in SQL is done with CREATE TABLE, which defines the table’s name and its columns with their data types and any constraints. This statement establishes the structure of the table, and you can add data later with INSERT. For example: CREATE TABLE employees ( id INT PRIMARY KEY, name VARCHAR(100), salary DECIMAL(10,2) ); The other statements perform actions on existing tables: INSERT INTO adds new rows, UPDATE changes data in existing rows, and SELECT retrieves data from the table.

Creating a new table in SQL is done with CREATE TABLE, which defines the table’s name and its columns with their data types and any constraints. This statement establishes the structure of the table, and you can add data later with INSERT. For example: CREATE TABLE employees ( id INT PRIMARY KEY, name VARCHAR(100), salary DECIMAL(10,2) ); The other statements perform actions on existing tables: INSERT INTO adds new rows, UPDATE changes data in existing rows, and SELECT retrieves data from the table.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy