Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create table question: i do have to put " " ???

Status
Not open for further replies.

myroot

IS-IT--Management
Jul 3, 2003
15
0
0
ES
Hi folks:

I am using the 'getting started manual sql Version 7' from IBM. Starting with the first easy statement create table.
But, i typed corrrectly the info in the create table statement table : create table pers (id smallint not null,
name varchar, etc ) i get an error message. But when i use the create table wizard, and afterwards, saving the results as sql script, db2 saves it but using "" to define column
name, Why ??

create table pers ("id" smallint not null, "name".... )

Why does db2 use the " " to define column name(how do u call these.. in english.. semicollons ??)

is this the default or can i change it ?? I would like to do it manually and i do not want to use " ", if possible

please help


 
The column names and table names have to be enclosed within double-quotes (") if you wish to have a space in the tablename/column name ...

When DB2 'generates' SQL Statements, the col and tab names are enclosed within the quotes as a standard ...

You do not necessarily have to have "" for normal stuff ...

HTH

Sathyram
BTW, what is the error you get ?

More DB2 questions answered at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top