Last active
August 29, 2015 14:18
-
-
Save phpdave/71084e681d31becd0875 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--::REMOVED:: Can only use IF statement in a Stored Procedure | |
--If no SCRAPNEW Library create one w/ current user profile | |
--IF (NOT EXISTS(SELECT * FROM TABLE(SYSIBM.SCHEMAS()) AS SCHEMAS WHERE ODOBNM='SCRAPNEW')) THEN | |
-- CREATE SCHEMA SCRAPNEW; | |
--END IF; | |
/* Creating table SCRAPNEW.CUSTOMERS */ | |
CREATE TABLE SCRAPNEW.CUSTOMERS ( | |
ID BIGINT GENERATED ALWAYS AS IDENTITY ( | |
START WITH 1, INCREMENT BY 1, | |
NO ORDER, NO CYCLE, NO MINVALUE, | |
NO MAXVALUE, CACHE 20), | |
NAME VARCHAR (50), | |
ADDRESS VARCHAR (50), | |
CITY VARCHAR (50), | |
STATE VARCHAR (2), | |
ZIP INTEGER); | |
/* Setting label text for SCRAPNEW.CUSTOMERS */ | |
LABEL ON TABLE SCRAPNEW.CUSTOMERS IS 'Customer Table' ; | |
/* Setting column labels for SCRAPNEW.CUSTOMERS */ | |
LABEL ON COLUMN SCRAPNEW.CUSTOMERS ( | |
ID TEXT IS 'Autogenerated ID' , | |
NAME TEXT IS 'Name of customer' , | |
ADDRESS TEXT IS 'Address of Customer' , | |
CITY TEXT IS 'City of Customer' , | |
STATE TEXT IS 'State abbrev. of Customer' , | |
ZIP TEXT IS 'ZIP of Customer' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment