In the SQL reference you find syntax 'create table table-name'. Table-name is further defined as 'sql identifier' which comes in 2 basic forms undelimited and delimited (in quotes). In delimited you'll find
'Leading and embedded blanks in the sequence are significant.
Trailing blanks in the sequence are not significant. The length of a delimited identifier does not include the starting and ending escape characters. Embedded escape characters (that appear as two characters) are counted in the length as a single character.'
Btw find the pdf of the SQL reference and search don't try this in the knowledge centre you'll never find it.
However ignore that for one minute. Why on earth would anyone put not printable or blank characters in a table name? It is a recipe for problems, even mixing upper case and lower case is asking for difficulty as some CLIs and interfaces are case sensitive and some are not. Windows v Linux. There is no reason to make life difficult, so why do it. It is why by and large table names are not 128 characters long in practice (though could be) because it makes it tough for programmers and more open to mistakes.
Just because you can doesn't mean you should.
Data and information professionals should be aiming for clarity and simplicity.
It is a pity the knowledge centre fails to provide the simplicity of the SQL reference pdf in this case, because I don't think you could answer the question without the pdf. Search on table-name in the knowledge centre produces more hits than you could search and nothing immediately useful to this question. Needle in a haystack is an appropriate phrase.
------------------------------
Chris Andrews
------------------------------
Original Message:
Sent: Mon August 24, 2020 01:26 PM
From: Dave Seibert
Subject: Db2 trimming trailing blanks in table names in -601 SQLcode processing
Good day,
I am looking to find where it is documented that the CREATE TABLE process considers table
"DJS"."STAFF " the same as "DJS"."STAFF"
Creating "DJS"."STAFF "
and then creating "DJS"."STAFF" results in -601 SQLcode - table already exists.
I don't recall that behavior and I can't find it documented anywhere.
Please advise.
thank you
dave seibert
------------------------------
Dave Seibert
------------------------------
#Db2forz/OS