CREATE TABLE BILLS ( BILL_NO NUMBER, NAME CHAR(30), AMOUNT NUMBER, ACCOUNT_ID NUMBER);
CREATE TABLE BILLS ( BILL_NO NUMBER, NAME CHAR(30) NOT NULL, AMOUNT NUMBER, ACCOUNT_ID NUMBER NOT NULL);
INSERT INTO BILLS VALUES( 1, "Joe's Computer Service", 25, 1);
INSERT INTO BILLS VALUES( 2, NULL, 25000, 1);
CREATE DATABASE PAYMENTS;
CREATE TABLE BILLS ( BILL_NO NUMBER, NAME CHAR(30) NOT NULL, AMOUNT NUMBER, ACCOUNT_ID NUMBER NOT NULL);
CREATE TABLE BANK_ACCOUNTS ( ACCOUNT_ID NUMBER NOT NULL, TYPE CHAR(30), BALANCE NUMBER, BANK CHAR(30));
CREATE TABLE COMPANY ( NAME CHAR(30) NOT NULL, ADDRESS CHAR(50), CITY CHAR(30), STATE CHAR(2));
CREATE TABLE NEW_BILLS(BILL_NO, NAME, AMOUNT, ACCOUNT_ID) AS (SELECT * FROM BILLS WHERE AMOUNT < 50);
ALTER TABLE NEW_BILLS ADD COMMENTS CHAR(80);
DROP TABLE NEW_BILLS;
