|
Glassfish example source code file (create_derby.sql)
The Glassfish create_derby.sql source codeCREATE TABLE CMP3_CUSTOMER(CUST_ID INTEGER PRIMARY KEY NOT NULL,CUST_VERSION INTEGER,CITY VARCHAR(255),NAME VARCHAR(255)); CREATE TABLE CMP3_ITEM(ITEM_ID INTEGER PRIMARY KEY NOT NULL,ITEM_VERSION INTEGER, DESCRIPTION VARCHAR(255),NAME VARCHAR(255)); CREATE TABLE CMP3_ORDER(ORDER_ID INTEGER PRIMARY KEY NOT NULL,ORDER_VERSION INTEGER,QTY INTEGER,SHIPADD VARCHAR(255),CUST_ID INTEGER,ITEM_ID INTEGER); ALTER TABLE CMP3_ORDER ADD CONSTRAINT FK_ORDER FOREIGN KEY (CUST_ID) REFERENCES CMP3_CUSTOMER (CUST_ID) ; ALTER TABLE CMP3_ORDER ADD CONSTRAINT FK_ITEM FOREIGN KEY (ITEM_ID) REFERENCES CMP3_ITEM(ITEM_ID) ; CREATE TABLE WEB_CUSTOMER(CUST_ID INTEGER PRIMARY KEY NOT NULL,CITY VARCHAR(255),CUSTNAME VARCHAR(255)); INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (1,'Santa Clara', 'Alice_1'); INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (2,'Cupertino', 'Alice_2'); INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (3,'Mountain View', 'Alice_3'); INSERT INTO WEB_CUSTOMER (CUST_ID,CITY,CUSTNAME) VALUES (4,'Fremont', 'Alice_4'); select city from web_customer where cust_id=1; select * from web_customer where custname Like 'Alice_1'; Other Glassfish examples (source code examples)Here is a short list of links related to this Glassfish create_derby.sql source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.