SQL CREATE ALTER DROP VIEW: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 15: Line 15:


=<tt>ALTER</tt>=
=<tt>ALTER</tt>=
<syntaxhighlight lang='sql'>
ALTER TABLE person [...]
</syntaxhighlight>
==Add/Remove a Column==
<syntaxhighlight lang='sql'>
ALTER TABLE person ADD COLUMN birthday DATE;
</syntaxhighlight>
:{| class="wikitable" style="text-align: left;"
|-
| [[PostgreSQL_DDL_Operations#Add/Remove_a_Column|PostgreSQL]] || [[MySQL_DDL_Operations#Alter_Table|MySQL]]
|-
|}


=<tt>DROP</tt>=
=<tt>DROP</tt>=

Revision as of 17:23, 23 May 2024

Internal

Overview

CREATE

CREATE VIEW cust_view AS SELECT id, name, address FROM customer;
PostgreSQL MySQL

ALTER

DROP

DROP TABLE person [...]
PostgreSQL MySQL

Features

AUTO_INCREMENT

AUTO_INCREMENT