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 (لغة تعريف البيانات) يغير الهيكل — أي الجداول نفسها.
  • DML (لغة معالجة البيانات) يعمل مع البيانات داخل الجداول — بقراءتها عبر SELECT، وإضافتها أو تغييرها أو حذفها عبر INSERT/UPDATE/DELETE. كل ما سبق (SELECT) هو DML.

CREATE TABLE هو الأمر الرئيسي لـ DDL. يعرض كل عمود مع نوع بيانات ويحدد المفتاح الأساسي:

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