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 |
Hi All, Recently I attended a interview for a developer position in an educational university. They asked me the a question, I answered somehow but I was not not satisfied myself. Can anybody reply for it? The question is: A business user comes to you directly with an urgent request:: there is a problem with some students not being able to re-enrol. It appears that ?something has gone wrong with the end-dating of some previous courses they had enrolled in, and this is preventing them from completing their on-line re-enrolments?. Fortunately the user has done some analysis on the situation, and has developed some code to change the end dates. They tell you that they have tested this code in the ?dev? environment, and it works fine. They are asking you to please get this implemented in production as soon as possible. What steps would you take in response to their request ? Thanks
What is SQL Tuning Advisor in Oracle?
What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?
Which environment variables are absolutely critical in order to run the OUI?
What is the purpose of tables, private synonyms and public synonyms in Oracle?
How to create a table index?
In Oracle 9i what does "i" Stands for?
What does `(+)` do in a where clause?
20. Using a set operator, display the client number of all clients who have never placed an order.
How to login to the server without an instance?
It's Urgent? How to IMPORT .xls & .txt file into ORACLE?
How to store pictures on to the database?