Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PickListContent
- IdList IdPick Text
- 1 1 Apples
- 1 2 Oranges
- 1 3 Pears
- 2 1 Dogs
- 2 2 Cats
- PickList
- Id Description
- 1 Fruit
- 2 Pets
- CREATE TABLE PickList(
- ListName varchar(15),
- Value varchar(15),
- Display varchar(15),
- Primary Key (ListName, Display)
- )
- # Put in the name of the list
- insert into lists (id, name) values (1, "Country in North America");
- # Put in the values of the list
- insert into list_options (id, list_id, value_text) values
- (1, 1, "Canada"),
- (2, 1, "United States of America"),
- (3, 1, "Mexico");
- id - identity or UUID field (I actually call the field xxx_id where xxx is the name of the table).
- name - display name of the item
- display_order - small int of order to display. Default this value to something greater than 1
- select optionDesc from Options where 'MyList' = optionList
- select optionDesc from Options where 'MyList' = optionList
- select optionDesc from Options where 'MyList' = optionList
- SQL> desc aux_values;
- Name Type
- ----------------------------------------- ------------
- VARIABLE_ID VARCHAR2(20)
- VALUE_SEQ NUMBER
- DESCRIPTION VARCHAR2(80)
- INTEGER_VALUE NUMBER
- CHAR_VALUE VARCHAR2(40)
- FLOAT_VALUE FLOAT(126)
- ACTIVE_FLAG VARCHAR2(1)
Add Comment
Please, Sign In to add comment