User Tools

Site Tools


podoc:state_sql_table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
podoc:state_sql_table [2007/04/12 12:59]
Luud
podoc:state_sql_table [2007/04/20 12:20]
Luud
Line 11: Line 11:
 === Schema === === Schema ===
  
-  create table state ( +<code sql> 
-    identifier            integer not null primary key, +create table state ( 
-    code                  varchar(5), +  identifier            integer not null primary key, 
-    value                 varchar(40) +  code                  varchar(5), 
-  );+  value                 varchar(40) 
 +); 
 +</code> 
 + 
 +=== References tables === 
 + 
 +None. 
 + 
 +=== Is referenced by tables === 
 + 
 +  * [[contact_info sql table|contact_info]](state) references identifier
  
 === Related sequences === === Related sequences ===
Line 22: Line 32:
  
 === Related indexes === === Related indexes ===
 +
 +None.
  
 === Related functions === === Related functions ===
 +
 +None.
  
 === Related views === === Related views ===
 +
 +None.
  
 === History === === History ===
Line 37: Line 53:
 Still in use Still in use
  
-== Change history ==+== Schema change history ==
  
 = Version 2.5 = = Version 2.5 =
  
-  create table state ( +<code sql> 
-    identifier            integer not null primary key, +create table state ( 
-    code                  varchar(5), +  identifier            integer not null primary key, 
-    value                 varchar(40) +  code                  varchar(5), 
-  );+  value                 varchar(40) 
 +); 
 +</code> 
 + 
 +== Data change history == 
 + 
 += Version 2.5 = 
 + 
 +<code sql> 
 +insert into state values (nextval('state_id_sequence'), 'AL', 'Alabama'); 
 +insert into state values (nextval('state_id_sequence'), 'AK', 'Alaska'); 
 +insert into state values (nextval('state_id_sequence'), 'AZ', 'Arizona'); 
 +insert into state values (nextval('state_id_sequence'), 'AR', 'Arkansas'); 
 +insert into state values (nextval('state_id_sequence'), 'CA', 'California'); 
 +insert into state values (nextval('state_id_sequence'), 'CO', 'Colorado'); 
 +insert into state values (nextval('state_id_sequence'), 'CT', 'Connecticut'); 
 +insert into state values (nextval('state_id_sequence'), 'DE', 'Delaware'); 
 +insert into state values (nextval('state_id_sequence'), 'DC', 'District of Columbia'); 
 +insert into state values (nextval('state_id_sequence'), 'FL', 'Florida'); 
 +insert into state values (nextval('state_id_sequence'), 'GA', 'Georgia'); 
 +insert into state values (nextval('state_id_sequence'), 'HI', 'Hawaii'); 
 +insert into state values (nextval('state_id_sequence'), 'ID', 'Idaho'); 
 +insert into state values (nextval('state_id_sequence'), 'IL', 'Illinois'); 
 +insert into state values (nextval('state_id_sequence'), 'IN', 'Indiana'); 
 +insert into state values (nextval('state_id_sequence'), 'IA', 'Iowa'); 
 +insert into state values (nextval('state_id_sequence'), 'KS', 'Kansas'); 
 +insert into state values (nextval('state_id_sequence'), 'KY', 'Kentucky'); 
 +insert into state values (nextval('state_id_sequence'), 'LA', 'Louisiana'); 
 +insert into state values (nextval('state_id_sequence'), 'ME', 'Maine'); 
 +insert into state values (nextval('state_id_sequence'), 'MD', 'Maryland'); 
 +insert into state values (nextval('state_id_sequence'), 'MA', 'Massachusetts'); 
 +insert into state values (nextval('state_id_sequence'), 'MI', 'Michigan'); 
 +insert into state values (nextval('state_id_sequence'), 'MN', 'Minnesota'); 
 +insert into state values (nextval('state_id_sequence'), 'MS', 'Mississippi'); 
 +insert into state values (nextval('state_id_sequence'), 'MO', 'Missouri'); 
 +insert into state values (nextval('state_id_sequence'), 'MT', 'Montana'); 
 +insert into state values (nextval('state_id_sequence'), 'NE', 'Nebraska'); 
 +insert into state values (nextval('state_id_sequence'), 'NV', 'Nevada'); 
 +insert into state values (nextval('state_id_sequence'), 'NH', 'New Hampshire'); 
 +insert into state values (nextval('state_id_sequence'), 'NJ', 'New Jersey'); 
 +insert into state values (nextval('state_id_sequence'), 'NM', 'New Mexico'); 
 +insert into state values (nextval('state_id_sequence'), 'NY', 'New York'); 
 +insert into state values (nextval('state_id_sequence'), 'NC', 'North Carolina'); 
 +insert into state values (nextval('state_id_sequence'), 'ND', 'North Dakota'); 
 +insert into state values (nextval('state_id_sequence'), 'OH', 'Ohio'); 
 +insert into state values (nextval('state_id_sequence'), 'OK', 'Oklahoma'); 
 +insert into state values (nextval('state_id_sequence'), 'OR', 'Oregon'); 
 +insert into state values (nextval('state_id_sequence'), 'PA', 'Pennsylvania'); 
 +insert into state values (nextval('state_id_sequence'), 'RI', 'Rhode Island'); 
 +insert into state values (nextval('state_id_sequence'), 'SC', 'South Carolina'); 
 +insert into state values (nextval('state_id_sequence'), 'SD', 'South Dakota'); 
 +insert into state values (nextval('state_id_sequence'), 'TN', 'Tennessee'); 
 +insert into state values (nextval('state_id_sequence'), 'TX', 'Texas'); 
 +insert into state values (nextval('state_id_sequence'), 'UT', 'Utah'); 
 +insert into state values (nextval('state_id_sequence'), 'VT', 'Vermont'); 
 +insert into state values (nextval('state_id_sequence'), 'VA', 'Virginia'); 
 +insert into state values (nextval('state_id_sequence'), 'WA', 'Washington'); 
 +insert into state values (nextval('state_id_sequence'), 'WV', 'West virginia'); 
 +insert into state values (nextval('state_id_sequence'), 'WI', 'Wisconsin'); 
 +insert into state values (nextval('state_id_sequence'), 'WY', 'Wyoming'); 
 +insert into state values (nextval('state_id_sequence'), 'AS', 'American Samoa'); 
 +insert into state values (nextval('state_id_sequence'), 'GU', 'Guam'); 
 +insert into state values (nextval('state_id_sequence'), 'MP', 'Northern Mariana Islands'); 
 +insert into state values (nextval('state_id_sequence'), 'PR', 'Puerto Rico'); 
 +insert into state values (nextval('state_id_sequence'), 'VI', 'Virgin Islands'); 
 +insert into state values (nextval('state_id_sequence'), 'FM', 'Federal States of Micronesia'); 
 +insert into state values (nextval('state_id_sequence'), 'UM', 'United States Minor Outlying Islands'); 
 +insert into state values (nextval('state_id_sequence'), '67', 'Johnston Atoll'); 
 +insert into state values (nextval('state_id_sequence'), 'MH', 'Marshall Islands'); 
 +insert into state values (nextval('state_id_sequence'), 'PW', 'Palau'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Midway Islands'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Navassa Island'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Wake Island'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Baker Island'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Howland Island'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Jarvis Island'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Kingman Reef'); 
 +insert into state values (nextval('state_id_sequence'), '', 'Palmyra Atoll'); 
 +</code> 
podoc/state_sql_table.txt · Last modified: 2007/04/20 13:39 by Luud