Which SQL command is used to create a new table in a database?

Study for the OCR GCSE Computer Science Exam. Prepare with flashcards, multiple choice questions, and hints. Get exam-ready with practical questions and answers!

The command used to create a new table in a database is "CREATE TABLE." This SQL statement defines a new table along with its structure, specifying the table name and the columns it contains, including their data types and any constraints. For instance, when creating a table for storing user information, you might define columns for user ID, name, and email, along with their respective data types.

The other commands serve different purposes: "INSERT INTO" is used to add new records to existing tables, "UPDATE" modifies existing records within a table, and "SELECT" retrieves data from tables. Each of these commands is essential for various database operations, but only "CREATE TABLE" is specifically designed for defining new tables.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy