Essential SQL Data Definition and Manipulation Commands
Classified in Technology
Written on in
English with a size of 5.28 KB
Basic SQL Statements: DDL and DML Commands
Data Definition Language (DDL) Commands
DDL commands are used to define or modify the structure of database objects. All DDL commands are auto-committed, meaning they save all changes permanently in the database immediately after execution.
The primary DDL commands are:
CREATEALTERTRUNCATEDROPRENAME
CREATE Command
The CREATE command is used to define a new table structure. It uniquely defines each column, specifying its name and data type. Each column definition is separated by a comma, and the SQL statement is terminated with a semicolon.
Syntax:
CREATE TABLE table_name (
column_name1 datatype1,
column_name2 datatype2,
...
column_namen datatypen
);Example:
CREATE TABLE Student (
reg_no... Continue reading "Essential SQL Data Definition and Manipulation Commands" »