Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create view on a table with char column creates it as a varchar2
<indiaconsultant1_at_gmail.com> a écrit dans le message de news: 1137650047.349214.70020_at_g43g2000cwa.googlegroups.com...
| But why does the view get created with a different datatype than the
| underlying table?
|
| On the original table the act field is char(10), why does the view
| change it to a varchar2?
|
You didn't directly use the field you used a decode and its first output value ('NINE') is of type VARCHAR2. Use cast if you want to change the default datatype: "cast(decode(...) as char(10))".
Regards
Michel Cadot
Received on Thu Jan 19 2006 - 00:06:39 CST