лабораторная работа 7

Download лабораторная работа 7

Post on 12-Jun-2015

71 views

Category:

Education

1 download

Embed Size (px)

TRANSCRIPT

  • 1. 7 DDL: Copyright Avdeyev V.A. 2008

2. 7 : SQL CREATE TABLE, ALTER TABLE DROP : CREATE TABLE, ALTER TABLE DROP 7Copyright Avdeyev V.A. 2008 3. (1/2) CREATE TABLE. . DML INSERT. CREATE TABLE , . . , , . 7Copyright Avdeyev V.A. 2008 4. (2/2) , , , , . , 7Copyright Avdeyev V.A. 2008 5. (1/2) - ( ) , . , SELECT, UPDATE DELETE , . INSERT; . UNIQUE INDEX : 7Copyright Avdeyev V.A. 2008 6. (2/2) , . , . 7Copyright Avdeyev V.A. 2008 7. ALTER TABLE , . , . . NULL . 7Copyright Avdeyev V.A. 2008 8. (.. ) , . 7Copyright Avdeyev V.A. 2008 9. : - , , . - INSERT UPDATE , , : 3 / 8Copyright Avdeyev V.A. 2008 10. (1/5) . , ., . , , , , 7Copyright Avdeyev V.A. 2008 11. (2/5) CREATE TABLE, (NULL) NOT NULL. UNIQUE. , , , . 7Copyright Avdeyev V.A. 2008 12. (3/5) PRIMARY KEY . , UNIQUE, , ( ) . 7Copyright Avdeyev V.A. 2008 13. (4/5) SQL CHECK, , , , . CHECK CHECK , . , . 7Copyright Avdeyev V.A. 2008 14. (5/5) FOREIGN KEY SQL FOREIGN KEY. , , . , , . , . Pktable , 7Copyright Avdeyev V.A. 2008 15. , , . , ; SELECT, . . ROLLBACK ROLLBACK () 7Copyright Avdeyev V.A. 2008 16. (1/3) , , . , ; SELECT, . . ROLLBACK ROLLBACK () 7Copyright Avdeyev V.A. 2008 17. (2/3) ROLLBACK . , SAVEPOINT, . SAVEPOINT__ , - , , . 7Copyright Avdeyev V.A. 2008 18. (3/3) COMMIT () ( ), , , . COMMIT COMMIT. , , , , SELECT , COMMIT. , , .. . , DDL (, CREATE TABLE DROP TABLE) . 7Copyright Avdeyev V.A. 2008 19. CREATE TABLE, . . ( ). , 7, NULL , eq_id . , dep_id eq_id . dep_name. : , . 7Copyright Avdeyev V.A. 2008