Table creation: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
 
mNo edit summary
Line 10: Line 10:
addrCity Varchar(25) not null,
addrCity Varchar(25) not null,
addrState Char(2) not null,
addrState Char(2) not null,
addrZIP Char(10) not null
addrZIP Char(10) not null
)
)

Revision as of 20:08, 14 January 2007

Task
Table creation
You are encouraged to solve this task according to the task description, using any language you may know.

In this task, the goal is to create a table to store addresses.

UDB DB2

CREATE TABLE Address (
	addrID		Integer		generated by default as identity,
	addrStreet	Varchar(50)	not null,
	addrCity	Varchar(25)	not null,
	addrState	Char(2)		not null,
	addrZIP		Char(10)	not null
)