Is it possible to configure the implicit typing rule in Oracle Server (at least version 10g) ? If not a link to the documentation of the rules and how Oracle parameters impa开发者_StackOverflow中文版ct the rules would be great.
For exemple when executing this query :
SELECT '' AS A FROM DUAL
Oracle will report that column A has VARCHAR(0)
type on Oracle 10g and VARCHAR(32)
on Oracle 9i.
Thanks
you can be explicit, it will work with all versions of Oracle:
SQL> CREATE VIEW test AS SELECT CAST(NULL AS VARCHAR2(32)) var32 FROM DUAL;
View created
SQL> desc test
Name Type Nullable Default Comments
----- ------------ -------- ------- --------
VAR32 VARCHAR2(32) Y
As Gary says, the default datatype is CHAR....
SQL> create view v23 as select '' a from dual
2 /
View created
SQL> desc a
Name Null? Type
------------------ -------- ---------------
A CHAR
What problem are you trying to solve?
精彩评论