473,487 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 36329
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
1686
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
2184
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
11349
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
9818
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
21979
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
64785
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
3379
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
1841
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
1648
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
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.