Skip to content · ⁨본문 바로가기⁩
English

Two kinds of SQL command

SQL has two halves:

  • DDL (Data Definition Language) changes the structure — the tables themselves.
  • DML (Data Manipulation Language) works with the data inside the tables — reading it with SELECT, and adding, changing, or removing it with INSERT/UPDATE/DELETE. Everything so far (SELECT) is DML.

CREATE TABLE is the main DDL command. It lists each column with a data type and marks the primary key:

한국어

SQL 명령의 두 가지 유형

SQL에는 두部分组成이 있습니다:

  • DDL (Data Definition Language)은 structure — 테이블 자체를 변경합니다.
  • DML (Data Manipulation Language)은 테이블 안의 data와 작업합니다 — SELECT로 읽어들이고, INSERT/UPDATE/DELETE로 추가, 수정, 또는 제거합니다. 지금까지의 모든 것(SELECT)은 DML입니다.

CREATE TABLE은 주요 DDL 명령입니다. 각 열을 나열하고 데이터 타입과 primary key를 지정합니다:

CREATE TABLE customer (
  id   INTEGER PRIMARY KEY,
  name VARCHAR(20),
  city VARCHAR(15)
);

CREATE TABLE 정의하는 열과 빈 테이블 생성

Handout · ⁨교재 자료⁩

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP