473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Maximum length for table names, colums etc.

Hello,

we are planning to port an application from one database to different
others, including DB2.
While reading the GettingStarted document for DB2 Personal Edition I got
a little confused about the allowed length for object names.

Did I understand this correct:

table names -> 128 characters (if ANSI characters)
column names -> 18 char.
primary key names -> 18 char.

In a web forum I found a hint that column names may be 30 characters
long, now I don't now if this is correct.

Thanks for help,

Jens

Nov 12 '05 #1
1 36261
Jens Riedel wrote:
Hello,

we are planning to port an application from one database to different
others, including DB2.
While reading the GettingStarted document for DB2 Personal Edition I got
a little confused about the allowed length for object names.

Did I understand this correct:

table names -> 128 characters (if ANSI characters)
column names -> 18 char.
primary key names -> 18 char.

In a web forum I found a hint that column names may be 30 characters
long, now I don't now if this is correct.


Correct are the limits that you find in the SQL Reference, Appendix A:
http://publib.boulder.ibm.com/infoce...n/r0001029.htm

Column names are 30 bytes
Constraint names are 18 bytes (a primary key is just a constraint)
Unqualified table names are 128 bytes
Schema names (to qualify tables) are 30 bytes; schema names for used-defined
types are restricted to 8 bytes

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tobias | last post by:
Hi all, am I right assuming that the maximum length for a varchar field I can fetch with the sybase_fetch_* functions is 255? This maximum can only be circumvented by using a text or image...
12
by: dixie | last post by:
Is there a maximum length in VBA of a line containing stuff like the following: If password = "1234" or password = "1235" or password = ............... Then It seems to me that at some stage, I...
14
by: olekristianvillabo | last post by:
I have a regular expression that is approximately 100k bytes. (It is basically a list of all known norwegian postal numbers and the corresponding place with | in between. I know this is not the...
1
by: Alan Foxmore | last post by:
Hello all, Is it possible to use String.Format() to specify a maximum length for a formatted item? For example, let's say I have: String.Format("{0}", "FREDDY"); How can I specify that the...
3
by: hug | last post by:
The valid character set for the ID= attribute of html tags is listed here (http://www.htmlhelp.com/reference/html40/attrs.html) but I am having difficulty finding the maximum allowable length of...
7
by: Martin Pöpping | last post by:
Hello, does a String in C# have a maximum length? I tried to write a ToString Method of my class containing a hashtable. At the beginning of the method i defined a String "ret". In every...
2
by: Paul Johnston | last post by:
I know this may sound silly but given something like if ($_ =~m/(one)|(two)|(three)/) Is there a maximum length on the size of the item between "/" and" /" ? Just curious as regards showing...
1
by: RobinAG | last post by:
Does anyone know if table, form, query, report names, are affected by the 8.3 filename conventions of Windows? I have some fairly long table names, with multiple suffixes, and I'm wondering if I...
0
by: Ramu528 | last post by:
Friends, I am working on excel sheet. i populated gridview with excel sheet data. the gridview has one column. have to find out the maximum length of String in that column. For example:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.