类别 全部

作者:dr inż. Michał Malinowski 1 天以前

27

Składnia SQL

SQL, or Structured Query Language, is a powerful tool used to manage and manipulate relational databases. It is divided into several distinct categories, each serving a specific function.

Składnia SQL

Więcej na https://www.drmalinowski.edu.pl/

SQL Structured Query Language

TCL Transaction Control Language

RELEASE SAVEPOINT
SAVEPOINT
ROLLBACK
TO SAVEPOINT
COMMIT

DCL Data Control Language

REVOKE
GRANT
ALL PRIVILEGES

DML Data Manipulation Language

DELETE
FROM TABLE_NAME
UPDATE
WHERE CONDITION
SET COLUMN_NAME = VALUE
INSERT
VALUES(...)
INSERT INTO TABLE_NAME

DDL Data Definition Language

TRUNCATE
INDEX
DATABASE
ALTER
RENAME
MODIFY
DROP
ADD
CREATE
CONSTRAINTS

DEFAULT

CHECK

UNIQUE

FOREIGN KEY

PRIMARY KEY

VIEW
TABLE
DATABASE

Typy danych

TIMESTAMP
JSON
BOOLEAN
DATE
VARCHAR
INT

Funkcje agregujące

MAX()
MIN()
COUNT()
SUM()
AVG()

DQL Data Query Language

ALIAS
AS
ORDER BY
OFFSET
LIMIT
COLUMN DESC
COLUMN ASC
GROUP BY
HAVING
COLUMN_NAME
WHERE
Specjalne

EXISTS

ALL

ANY

IN

LIKE

BETWEEN

Logiczne

NOT

OR

AND

Operatory

IS NOT NULL

IS NULL

<, >, <=, >=, =

JOIN
CROSS JOIN
FULL JOIN
RIGHT JOIN
LEFT JOIN
INNER JOIN
FROM
TABLE(S)_NAME
SELECT
ALL TABLE(*)
COLUMN(S)