On 11/04/2018 19:45, Simon Slavin wrote:
On 11 Apr 2018, at 6:41pm, J Decker <d3c...@gmail.com> wrote:
Is there something about SQL that requires constraints to follow all column
definitions?
I don't know if it applies to SQL in general, but it is in SQLite:
<https://sqlite.org/syntax/create-table-stmt.html>
The table constraints come after the column definitions.
That is a SQLite restriction. According to the SQL standard,
column definitions and table constraints can appear in any order.
In fact, PostgreSQL accepts the following:
create table T (
constraint foo check (x > 0),
x integer primary key
);
Life.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users