Add Column - Adds a column to a table | ||
ALTER TABLE test.dbo.Employee ADD new_col char(25) DEFAULT '4' NOT NULL | ||
Add Primary Key - Adds a primary key to a table | ||
ALTER TABLE test.dbo.Employee ADD PRIMARY KEY (ssn) | ||
Add Foreign Key - Adds a foreign key to a table | ||
ALTER TABLE test.dbo.Employee ADD FOREIGN KEY (dno) REFERENCES test.dbo.Department(dnumber) | ||
Add Constraint - Adds a check constraint to a table | ||
ALTER TABLE test.dbo.Employee ALTER COLUMN ssn char(25) | ||
Change Column Type - Changes the data type of a column | ||
ALTER TABLE test.dbo.Employee DROP COLUMN ssn | ||
Drop Column - Drops a column from a table | ||
ALTER TABLE test.dbo.Employee DROP CONSTRAINT test_const | ||
Drop Constraint - Drops a check constraint from a table | ||
ALTER TABLE test.dbo.Employee DROP CONSTRAINT PK__Employee__15502E78 | ||
Drop Primary Key - Drops a primary key from a table | ||
ALTER TABLE test.dbo.Employee DROP CONSTRAINT FK__Employee__dno__182C9B23; | ||
Drop Foreign Key - Drops a foreign key from a table | ||
ALTER TABLE test.dbo.Employee DROP CONSTRAINT FK__Employee__dno__182C9B23; | ||
Rename Table - Renames a table | ||
exec sp_rename @objname = 'test.dbo.Employee', @newname = 'Employee_new' | ||
Rename Column - Renames a column | ||
exec sp_rename @objname = 'test.dbo.Employee.ssn', @newname = 'ssn_new', @objtype = 'COLUMN' |
'온라인게임' 카테고리의 다른 글
Dark GDK - FPS 게임 화면 만들기 / 3D (3) | 2011.10.26 |
---|---|
Dark GDK - 이미지 로딩 예제 / 2D (0) | 2011.10.25 |
6. SDL Entities (0) | 2011.10.24 |
5. SDL Animation (0) | 2011.10.24 |
4. SDL Tutorial - Tic Tac Toe (0) | 2011.10.19 |