SQL requests Essay

Èíñòðóêöèÿ SQL SELECT

1

2

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû;

Óñëîâèå SQL DISTINCT

1

2

SELECTDISTINCTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû;

Óñëîâèå SQL WHERE

1

2

3

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ;

Óñëîâèå SQL AND/OR

1

2

3

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ-1{AND|OR}ÓÑËÎÂÈÅ-2;

Óñëîâèå SQL IN

1

2

3

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREèìÿ_ñòîëáöàIN(çíà÷åíèå-1,çíà÷åíèå-2,…çíà÷åíèå-N);

Óñëîâèå SQL BETWEEN

1

2

3

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREèìÿ_ñòîëáöàBETWEENçíà÷åíèå-1ANDçíà÷åíèå-2;

Óñëîâèå SQL LIKE

1

2

3

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREèìÿ_ñòîëáöàLIKE{ØÀÁËÎÍ};

Óñëîâèå SQL ORDER BY

1

2

3

4

SELECTñòîëáåö1,ñòîëáåö2….ñòîëáåöN

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ

ORDERBYèìÿ_ñòîëáöà{ASC|DESC};

Óñëîâèå SQL GROUP BY

1

2

3

4

SELECTSUM(èìÿ_ñòîëáöà)

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ

GROUPBYèìÿ_ñòîëáöà;

Óñëîâèå SQL COUNT

1

2

3

SELECTCOUNT(èìÿ_ñòîëáöà)

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ;

Óñëîâèå SQL HAVING

1

2

3

4

5

SELECTSUM(èìÿ_ñòîëáöà)

FROMèìÿ_òàáëèöû

WHEREÓÑËÎÂÈÅ

GROUPBYèìÿ_ñòîëáöà

HAVING(àðèôìåòè÷åñêàÿôóíêöèÿÓÑËÎÂÈÅ);

Èíñòðóêöèÿ SQL CREATE TABLE

1

2

3

4

5

6

7

8

CREATETABLEèìÿ_òàáëèöû(

ñòîëáåö1òèïäàííûõ,

ñòîëáåö2òèïäàííûõ,

ñòîëáåö3òèïäàííûõ,

…..

ñòîëáåöNòèïäàííûõ,

PRIMARYKEY(îäèíèëèáîëååñòîëáöîâ)

);

Èíñòðóêöèÿ SQL DROP TABLE

1

2

3

4

DROPTABLEèìÿ_òàáëèöû;

ÈíñòðóêöèÿSQLCREATEINDEX

CREATEUNIQUEINDEXèìÿ_èíäåêñà

ONèìÿ_òàáëèöû(ñòîëáåö1,ñòîëáåö2,…ñòîëáåöN);

Èíñòðóêöèÿ SQL DROP INDEX

1

2

ALTERTABLEèìÿ_òàáëèöû

DROPINDEXèìÿ_èíäåêñà;

Èíñòðóêöèÿ SQL DESC

1

DESCèìÿ_òàáëèöû;

Èíñòðóêöèÿ SQL TRUNCATE TABLE

1

TRUNCATETABLEèìÿ_òàáëèöû;

Èíñòðóêöèÿ SQL ALTER TABLE

1

ALTERTABLEèìÿ_òàáëèöû{ADD|DROP|MODIFY}èìÿ_ñòîëáöà{òèï_äàííûõ};

Èíñòðóêöèÿ SQL ALTER TABLE

1

ALTERTABLEèìÿ_òàáëèöûRENAMETOíîâîå_èìÿ_òàáëèöû;

Èíñòðóêöèÿ SQL INSERT INTO

1

2

INSERTINTOèìÿ_òàáëèöû(ñòîëáåö1,ñòîëáåö2….ñòîëáåöN)

ÇÍÀ×ÅÍÈÅS(çíà÷åíèå1,çíà÷åíèå2….çíà÷åíèåN);

Èíñòðóêöèÿ SQL UPDATE

1

2

3

UPDATEèìÿ_òàáëèöû

SETñòîëáåö1=çíà÷åíèå1,ñòîëáåö2=çíà÷åíèå2….ñòîëáåöN=çíà÷åíèåN

[WHEREÓÑËÎÂÈÅ];

Èíñòðóêöèÿ SQL DELETE

1

2

DELETEFROMèìÿ_òàáëèöû

WHERE{ÓÑËÎÂÈÅ};

Èíñòðóêöèÿ SQL CREATE DATABASE

1

CREATEDATABASEèìÿ_áàçû_äàííûõ;

Èíñòðóêöèÿ SQL DROP DATABASE

1

DROPDATABASEèìÿ_áàçû_äàííûõ;

Èíñòðóêöèÿ SQL USE

1

USEèìÿ_áàçû_äàííûõ;

Èíñòðóêöèÿ SQL COMMIT

1

COMMIT;

Èíñòðóêöèÿ SQL ROLLBACK

1

ROLLBACK;

Order a unique copy of this paper

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal