Igor Korot wrote:
> Does SQLite supports the FK name?
> If yes, what is the proper syntax?

  CREATE TABLE t (
    x PRIMARY KEY,
    y,
    CONSTRAINT this_is_the_name FOREIGN KEY (y) REFERENCES t(x)
  );

or

  CREATE TABLE t (
    x PRIMARY KEY,
    y CONSTRAINT this_is_the_name REFERENCES t(x)
  );

But it is ignored:

  > PRAGMA foreign_key_list(t);
  0|0|t|y|x|NO ACTION|NO ACTION|NONE
  > INSERT INTO t VALUES (1, 2);
  Error: FOREIGN KEY constraint failed


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to