Account
Categories

What is a Schema in SQL?


When you create a table and define its columns, data types, and constraints, a structural blueprint—meaning the layout or design of the table—is formed.
This is known as the schema.

Syntax:

  CREATE TABLE table_name (
    column1 data_type CONSTRAINT,
    column2 data_type CONSTRAINT,
    ...
);