Re: [sqlite] Constraints must be defined last?

2018-04-11 Thread Lifepillar
On 11/04/2018 19:45, Simon Slavin wrote: On 11 Apr 2018, at 6:41pm, J Decker 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:

Re: [sqlite] Constraints must be defined last?

2018-04-11 Thread Simon Slavin
On 11 Apr 2018, at 6:41pm, J Decker 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: The table constraints

[sqlite] Constraints must be defined last?

2018-04-11 Thread J Decker
Is there something about SQL that requires constraints to follow all column definitions? sqlite> create table `option4_blobs` (`option_id` char(36) default '0', CONSTRAINT `value_id` UNIQUE (`option_id`),`binary` blob, FOREIGN KEY (`option_id`) REFERENCES `option4_map`(`option_id`)ON UPDATE