hai,
when to use char and varchar2....?
Answers were Sorted based on User's Feedback
Answer / gangaram
char- should be use when you know that the number of
characters in the coloumn field is constant .ex if the
gender is coloumn with char(1)- so only M and F are the two
options so char(1) is better to use than varchar2.
varchar2- first of all varchar2 is a oracle standard.
varchar2 is nothing but variable characters.
ex- if you have defined the column with varchar2(50) and
when u r inserting the record into that column with only 10
letter/characters then only 10 bits will be used instead of
50.
but if u declare char(50) full 50 bits is allocated for
that column. so even if u enter on 20 characters the space
utilized will be full 50 bits.
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / kranthi
char and varchar2 both we will use for character purpouse
only.but char take how many bytes we r specified in data
type size it will take that much of size.
eg: x char(10);
x:='nani' the remaining 6 character space will b wasted.
but in varchar2 we can use that 6 bytes for another
character also.
i hope so u under stood very well.
Is This Answer Correct ? | 7 Yes | 0 No |
Which dictionary tables and/or views would you look at to diagnose a locking issue?
What is the difference between alert log file and trace file ?
hai, I am searching job on Oracle10g and PL/sql,Unix... can any one send me resume format. an suggest me how to prepare.. ann books..
The table has 3 columns 4 rows. The output is which column has least null values( A COL SHOULD BE THE OUTPUT) Write the query plz. A B C ================ 1 NULL 2 NULL 3 4 NULL 5 6 7 NULL NULL O/P C = 2 4 6
Use of an integrity constraint is better to validate data. Explain
what is the difference between table and veiw?
What are data pump export and import modes?
Suppose U install the oracle DB either enterprise edition or express edition in ur personal PC, Is there the Database has been created after ur installation if not then where the oracle's all objects with data be stored?
If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...
How to empty your oracle recycle bin?
How to convert a date to char in oracle? Give one example.
How to loop through a cursor variable?