teacup. [ 掲示板 ] [ 掲示板作成 ] [ 有料掲示板 ] [ ブログ ]


スレッド一覧

  1. 足あと帳(0)
スレッド一覧(全1)  他のスレッドを探す 

*掲示板をお持ちでない方へ、まずは掲示板を作成しましょう。無料掲示板作成

新着順:2/10 記事一覧表示 | 《前のページ | 次のページ》

sql

 投稿者:a  投稿日:2012年 6月 5日(火)13時22分12秒
  通報 返信・引用
  CREATE TABLE ONLINE_MEMBER(
MEMBER_NO INTEGER NOT NULL,
PASSWORD CHAR(8) NOT NULL,
NAME VARCHAR(20) NOT NULL,
AGE INTEGER NOT NULL,
SEX CHAR(1) NOT NULL,
ZIP VARCHAR(8),
ADDRESS VARCHAR(50),
TEL VARCHAR(20) NOT NULL,
REGISTER_DAY DATE NOT NULL,
DELETE_FLG BOOL NOT NULL,
LAST_UPD_DAY TIMESTAMP,
PRIMARY KEY(MEMBER_NO));

CREATE TABLE ONLINE_STAFF(
STAFF_NO INTEGER NOT NULL,
PASSWORD VARCHAR(8) NOT NULL,
NAME VARCHAR(20) NOT NULL,
AGE INTEGER NOT NULL,
SEX CHAR(1) NOT NULL,
REGISTER_DAY DATE NOT NULL,
LAST_UPD_DAY TIMESTAMP,
PRIMARY KEY(STAFF_NO));

CREATE TABLE ONLINE_CATEGORY(
CTGR_ID INTEGER NOT NULL,
NAME VARCHAR(20) NOT NULL,
LAST_UPD_DAY TIMESTAMP,
PRIMARY KEY(CTGR_ID));

CREATE TABLE ONLINE_GOODS(
GOODS_CODE VARCHAR(14) NOT NULL,
CTGR_ID INTEGER NOT NULL,
GOODS_NAME VARCHAR(50) NOT NULL,
GOODS_MAKER VARCHAR(20) NOT NULL,
VOLUME INTEGER NOT NULL,
REGISTER_DAY DATE NOT NULL,
MONEY BIGINT NOT NULL,
MEMO VARCHAR(50),
DELETE_FLG CHAR(1) NOT NULL,
LAST_UPD_DAY TIMESTAMP,
PRIMARY KEY(GOODS_CODE));

CREATE TABLE ONLINE_ORDER(
ORDER_NO INTEGER NOT NULL,
MEMBER_NO INTEGER NOT NULL,
TOTAL_MONEY BIGINT NOT NULL,
TOTAL_TAX BIGINT NOT NULL,
ORDER_DAY DATE NOT NULL,
COLLECT_NO VARCHAR(16) NOT NULL UNIQUE,
LAST_UPD_DAY TIMESTAMP,
PRIMARY KEY(ORDER_NO));

CREATE TABLE ONLINE_ORDER_LIST(
LIST_NO INTEGER NOT NULL,
COLLECT_NO VARCHAR(16) NOT NULL,
GOODS_CODE VARCHAR(14) NOT NULL,
VOLUME INTEGER NOT NULL,
MONEY BIGINT NOT NULL,
PRIMARY KEY(LIST_NO));

INSERT INTO online_category VALUES(1,'カテゴリ1',now());
INSERT INTO online_category VALUES(2,'カテゴリ2',now());
INSERT INTO online_category VALUES(3,'カテゴリ3',now());
INSERT INTO online_category VALUES(4,'カテゴリ4',now());
INSERT INTO online_category VALUES(5,'カテゴリ5',now());
INSERT INTO online_category VALUES(6,'カテゴリ6',now());
INSERT INTO online_category VALUES(7,'カテゴリ7',now());
INSERT INTO online_category VALUES(8,'カテゴリ8',now());
INSERT INTO online_category VALUES(9,'カテゴリ9',now());
INSERT INTO online_category VALUES(10,'カテゴリ10',now());
INSERT INTO online_category VALUES(11,'カテゴリ11',now());

INSERT INTO online_goods VALUES('00000001',1,'商品名1','販売元1',50,now(),101,'メモ1',1,now());
INSERT INTO online_goods VALUES('00000002',1,'商品名2','販売元2',50,now(),102,'メモ2',1,now());
INSERT INTO online_goods VALUES('00000003',2,'商品名3','販売元3',50,now(),103,'メモ3',1,now());
INSERT INTO online_goods VALUES('00000004',2,'商品名4','販売元1',50,now(),104,'メモ4',1,now());
INSERT INTO online_goods VALUES('00000005',3,'商品名5','販売元2',50,now(),105,'メモ5',1,now());
INSERT INTO online_goods VALUES('00000006',3,'商品名6','販売元3',50,now(),106,'メモ6',1,now());
INSERT INTO online_goods VALUES('00000007',4,'商品名7','販売元1',50,now(),107,'メモ7',1,now());
INSERT INTO online_goods VALUES('00000008',4,'商品名8','販売元2',50,now(),108,'メモ8',1,now());
INSERT INTO online_goods VALUES('00000009',5,'商品名9','販売元3',50,now(),109,'メモ9',1,now());
INSERT INTO online_goods VALUES('00000010',5,'商品名10','販売元1',50,now(),110,'メモ10',1,now());
INSERT INTO online_goods VALUES('00000011',6,'商品名11','販売元2',50,now(),111,'メモ11',1,now());
INSERT INTO online_goods VALUES('00000012',6,'商品名12','販売元3',50,now(),112,'メモ12',1,now());
 
 
》記事一覧表示

新着順:2/10 《前のページ | 次のページ》
/10