SQL CREATE ALTER DROP TABLE: Difference between revisions
Jump to navigation
Jump to search
(→CREATE) |
(→CREATE) |
||
Line 17: | Line 17: | ||
|- | |- | ||
|} | |} | ||
If the <code>TEMPORARY</code> keyword is used, the created table will be [[SQL#Temporary_Table|temporary]] instead of [[SQL#Permanent_Table|permanent]]. | |||
=<tt>ALTER</tt>= | =<tt>ALTER</tt>= |
Revision as of 17:54, 23 May 2024
Internal
Overview
CREATE
CREATE [TEMPORARY] TABLE person
( id smallint,
name varchar(30) NOT NULL,
CONSTRAINT pk_person PRIMARY KEY (id)
);
If the TEMPORARY
keyword is used, the created table will be temporary instead of permanent.
ALTER
ALTER TABLE person [...]
Add/Remove a Column
ALTER TABLE person ADD COLUMN birthday DATE;
DROP
DROP TABLE person [...]