Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is difference between CHAR and VARCHAR2?What is the
maximum SIZE allowed for each type?

Answer Posted / roopesh kumar

Varchar2: The max. allowed length is 4000 byte default 0
i.e. nothing. This is variable length datatype. it will
take only same space as value stored.

Char: Max. permitable length 2000 byte. Default length 0.
It will store value blank padded to right side till
full length as declared.

Ex. SQL> create table fg (d varchar2);
create table fg (d varchar2)
*
ERROR at line 1:
ORA-00906: missing left parenthesis


SQL> create table fg (d char);

Table created.

SQL> desc fg
Name Null? Type
------------------------------- -------- ----
D CHAR(1)
SQL> create table cher_chk (col1 char(12));

Table created.

SQL> insert into cher_chk values ('raj');

1 row created.
SQL> select length(col1) from cher_chk
2 /

LENGTH(COL1)
------------
12

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I edit a stored procedure?

955


Is sql pronounced sequel or sql?

1223


how to convert character strings to dates? : Sql dba

999


What are records give examples?

959


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1223


what is denormalization. : Sql dba

1057


what is not null constraint? : Sql dba

978


In a distributed database system, can we execute two queries simultaneously?

1010


What is attribute indicator in pl sql?

974


what are null values? : Sql dba

907


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

929


What is online transaction processing (oltp)?

971


What normalization means?

915


What is the syntax and use of the coalesce function?

1107


What is meaning of <> in sql?

1025