ALTER TABLE {ADD {COLUMN [()] [NOT NULL] [CONSTRAINT ] |
ALTER COLUMN [()] |
CONSTRAINT } |
DROP {COLUMN I CONSTRAINT } }
ALTER TABLE:
. | |
, . , . | |
. | |
( ). | |
. CONSTRAINT. | |
, . CONSTRAINT. | |
, . |
ALTER TABLE . :
- ADD COLUMN. , ( ) . , 25 :
- ALTER TABLE ADD COLUMN TEXT(25)
- , . CONSTRAINT.
- NOT NULL, .
- ALTER COLUMN. , ( ) . , ( INTEGER), 10 :
- ALTER TABLE ALTER COLUMN TEXT(10)
- ADD CONSTRAINT. CONSTRAINT.
- DROP COLUMN. .
- DROP CONSTRAINT. , CONSTRAINT.
.
if exists(SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME = 'STUDENT' and CONSTRAINT_NAME = 'chk_recordbook_num')
Alter table STUDENT drop constraint chk_recordbook_num
. , . .
DROP {TABLE | INDEX ON | PROCEDURE | VIEW }
|
|
DROP:
, . | |
. | |
. | |
, . |
, .
, ALTER TABLE.
CREATE TABLE, - CREATE INDEX ALTER TABLE. , ALTER TABLE.
DROP TABLE PERSONS