sqlite-parser
demo
SQL Statement
CREATE TABLE Bees ( id integer PRIMARY KEY ON CONFLICT ROLLBACK AUTOINCREMENT, name varchar(50) NOT NULL UNIQUE, wings integer CONSTRAINT has_enough_wings CHECK (wings >= 2), legs integer CONSTRAINT too_many_legs CHECK (legs <= 6) ); INSERT INTO Bees (name, wings, legs) VALUES ('Dr. Bee', 2, 6); SELECT * FROM Bees b WHERE b.wings = 2 AND b.legs = 6; INSERT INTO Bees (name, wings, legs) VALUES ('Mr. Dragonfly', 4, 6), ('Nick', 0, 2);
Syntax Tree