Now the enumeration values are available directly in the Price table as they would be using an ENUM: you don’t need to join to the PriceType table to get the Type values, you only need to use it if you want to determine the sequence of the ENUMs.

INSERT INTO PriceType(Type, Seq) VALUES ('M',1), ('R',2), ('H',3); Should get you a syntax error. "The first form (with the "VALUES" keyword) creates a single new row in an existing table.": sqlite.org/lang_insert.html. Break it up avoid that: INSERT INTO PriceType(Type, Seq) VALUES ('M',1); INSERT INTO PriceType(Type, Seq) VALUES ('R',2); INSERT INTO PriceType(Type, Seq) VALUES ('H',3);
– ahcoxJun 5 '12 at 20:55

There was an answer that was meant to be a comment, but now it's gone. Essentially, since SQLite 3.7.11, several entries can be made with INSERT. The corrected syntax still works too.
– MPelletierNov 27 '12 at 17:31

8

Don't forget to PRAGMA foreign_keys = ON; for every session - because fkeys are disabled by default in sqlite3
– smathyApr 3 '13 at 4:38

2

If you wnat to avoid forgetting PRAGMA foreign_keys = ON; then you can set that up in your .sqliterc file in your home directory.
– EradicatoreMay 5 '13 at 20:46

1

Also, you may want to use the UNIQUE constraint on Seq. Something like this CREATE TABLE PriceType( Type Char(1) PRIMARY KEY NOT NULL, Seq INTEGER UNIQUE);
– EradicatoreMay 5 '13 at 21:53