SQL CREATE ALTER DROP TABLE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * _ALTER_|_DROP_TABLE|SQL")
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[SQL#CREATE_|_ALTER_|_DROP_TABLE|SQL]]
* [[SQL#CADT|SQL]]
* [[SQL_Data_Types#Overview|SQL Data Types]]
 
=<tt>CREATE</tt>=
<syntaxhighlight lang='sql'>
CREATE TABLE person
( id smallint,
  name varchar(30),
  CONSTRAINT pk_person PRIMARY KEY (id)
);
</syntaxhighlight>
:{| class="wikitable" style="text-align: left;"
|-
| [[PostgreSQL_DDL_Operations#Create_a_Table|PostgreSQL]] || MariaDB
|-
|}
 
 
 
<font color=darkkhaki>
* Refactor [[PostgreSQL_DDL_Operations#Internal|PostgreSQL DDL Operations]] and surface in "Standard SQL" everything that can be handled with standard SQL.
* Refactor [[MySQL_DDL_Operations|MySQL DDL Operations]] and surface in "Standard SQL" everything that can be handled with standard SQL.
</font>
 
=<tt>ALTER</tt>=
=<tt>DROP</tt>=

Revision as of 22:28, 22 May 2024

Internal

CREATE

CREATE TABLE person 
( id smallint, 
  name varchar(30), 
  CONSTRAINT pk_person PRIMARY KEY (id)
);
PostgreSQL MariaDB


ALTER

DROP