You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
820 B
19 lines
820 B
DROP TABLE IF EXISTS "generated" CASCADE; |
|
DROP TABLE IF EXISTS "item_12" CASCADE; |
|
|
|
CREATE TABLE "generated" ( |
|
id_always int GENERATED ALWAYS AS IDENTITY, |
|
id_primary int GENERATED ALWAYS AS IDENTITY primary key, |
|
id_default int GENERATED BY DEFAULT AS IDENTITY |
|
); |
|
|
|
CREATE TABLE "item_12" ( |
|
id int GENERATED ALWAYS AS IDENTITY primary key, |
|
name varchar(128) NOT NULL, |
|
category_id integer NOT NULL references "category"(id) on UPDATE CASCADE on DELETE CASCADE |
|
); |
|
|
|
INSERT INTO "item_12" (name, category_id) VALUES ('Agile Web Application Development with Yii1.1 and PHP5', 1); |
|
INSERT INTO "item_12" (name, category_id) VALUES ('Yii 1.1 Application Development Cookbook', 1); |
|
INSERT INTO "item_12" (name, category_id) VALUES ('Ice Age', 2); |
|
INSERT INTO "item_12" (name, category_id) VALUES ('Toy Story', 2);
|
|
|