Over a million developers have joined DZone.

TPC-W Code For Shopping_cart/shopping_cart_line Temp Hack

·

CREATE SEQUENCE sc_id_seq;
CREATE SEQUENCE scl_id_seq;

-- DROP TABLE shopping_cart;
CREATE TABLE shopping_cart
(
  sc_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('sc_id_seq'),
  sc_date timestamp without time zone
)
WITH (OIDS=FALSE);
ALTER TABLE shopping_cart OWNER TO postgres;

-- DROP TABLE shopping_cart_line;
CREATE TABLE shopping_cart_line
(
  scl_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('scl_id_seq'),
  scl_sc_id integer NOT NULL,
  scl_qty integer,
  scl_i_id integer NOT NULL
)
WITH (OIDS=FALSE);
ALTER TABLE shopping_cart_line OWNER TO postgres;
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}