home *** CD-ROM | disk | FTP | other *** search
- Listing 1:
-
- CREATE TABLE transactions (
- transaction_number NUMBER(8) NOT NULL,
- account_id VARCHAR(6) NOT NULL,
- transaction_type CHAR(1) NOT NULL,
- amount NUMBER(6) NOT NULL,
- posted CHAR(1) NOT NULL);
- INSERT INTO transactions VALUES (1, '111222', 'P', 100, 'N');
- INSERT INTO transactions VALUES (2, '222333', 'P', 200, 'N');
- INSERT INTO transactions VALUES (3, '222333', 'C', 300, 'N');
- INSERT INTO transactions VALUES (4, '999999', 'P', 400, 'N');
- INSERT INTO transactions VALUES (5, '111222', 'X', 500, 'N');
- INSERT INTO transactions VALUES (6, '111222', 'P', 100000, 'N');
- INSERT INTO transactions VALUES (7, '111222', 'C', 200000, 'N');
-
- CREATE TABLE accounts (
- account_id VARCHAR(6) NOT NULL,
- account_name VARCHAR(20) NOT NULL,
- credit_limit NUMBER(6) NOT NULL,
- credit_used NUMBER(6) NOT NULL);
- INSERT INTO accounts VALUES ('111222', 'John Dough', 2000, 1000);
- INSERT INTO accounts VALUES ('222333', 'Johnny Cash', 3000, 1000);
-
- CREATE TABLE errors (
- transaction_number NUMBER(8) NOT NULL,
- error_message VARCHAR(60) NOT NULL);