Friday, September 24, 2010

Autotrace from SYS - Some things appear to work but don't really

Autotrace from SYS - Some things appear to work but don't really We use autotrace to get the Execution Plan and Statistics. It appear to work but don't really from SYS user. We see that.SQL> create table t ( num number(2), name varchar2(10));Table created.SQL> insert into t values(1,'A');1 row created.SQL> insert into t values(2,'A');1 row created.SQL> select * from t;NUM NAME---------- ----------1 A2 ASQL> set autotrace on;SQL> select * from t;NUM NAME---------- ----------1 A2 AExecution Plan----------------------------------------------------------0...

Saturday, September 4, 2010

CHAR Vs VARCHAR

CHAR Vs VARCHAR: We see the information about the CHAR and VARCHAR in this Blog.Create table t ( X varchar2(30) , Y char(30));Insert into t values ('a','a');The above table is having the two fields X & Y and corresponding data types are varchar2 and char. The CHAR is nothing more than a VARCHAR2 that is blank padded out to the maximum length. That is difference between the column X and Y.The field X consumes 3 bytes – ( NULL indicator, leading byte length , 1 byte for ‘a’).The field Y consumes 32 bytes–(NULL indicator, leading byte length,...