DROP TABLE IF EXISTS products;
DROP SEQUENCE IF EXISTS product_record_num_sequence;
DROP SEQUENCE IF EXISTS product_product_id_sequence;

CREATE SEQUENCE product_record_num_sequence;
CREATE SEQUENCE product_product_id_sequence;

CREATE TABLE products (
    record_num INTEGER PRIMARY KEY DEFAULT nextval('product_record_num_sequence'),
    product_id INTEGER NOT NULL    DEFAULT nextval('product_product_id_sequence'),
    name       VARCHAR(20),
    exp_date   DATE    NOT NULL
);

