The only possible problem I can forsee is,
If the value in the table is ever greater than
12 chars.
Then you'll get an error indicating the variable
You are fetching into is too small.
To play it safe why not use an anchor declaration?
If the table is t and the varchar2 is col
Then you can define your plsql variable as
declare
x t.col%type;
...
now, you don't have to worry about it.
But, for the sake of argument, let's say
There was a check constraint on the field
And you were garunteed to have 12 chars at most,
Then no, you'll have no problem fetching into
A varchar2(12).
- a
-----Original Message-----
From: david skoczylas
[mailto:oracledba-ezmlmshield-x95740366.[Email address protected]
Sent: Thursday, July 28, 2005 3:26 AM
To: LazyDBA Discussion
Subject: RE: Datatype size difference in table and PL/Sql block
Hi Rajesh,
Do you experience problems? If so give us the errors you get.
Grts,
DSK
|-----Original Message-----
|From: Rajesh
|[mailto:oracledba-ezmlmshield-x89700133.[Email address protected]
|Sent: Thursday, July 28, 2005 8:55 AM
|To: LazyDBA Discussion
|Subject: Datatype size difference in table and PL/Sql block
|
|
|Hello DBA Gurus,
|
| I am having a table which contains a field
|with datatype varchar2 (22).
|
|
|
|But the data stored will be always less than or equal to 12 bytes.
|
|
|
|In my PL/SQL block, I am fetching this data. Here, its data type is
|varchar2 (12).
|
|
|
|What are the problems that I face because of the inconsistency in size?
|
|
|
|Should I reduce the size in the table structure?
|
|
|
|Please reply...
|
|Thanking You in advance
|
|Regards,
|Raj
|
|
|
|
|
|--------
|website: http://www.LazyDBA.com
|Please don't reply to RTFM questions
|Oracle documentation is here: http://tahiti.oracle.com
|To unsubscribe: see http://www.lazydba.com/unsubscribe.html
|To subscribe: see http://www.lazydba.com
|By using this list you agree to these
|terms:http://www.lazydba.com/legal.html
|
|
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page