Create table emp
(id number(9), name varchar2(20),salary
number(9,2));
The table has 100 records after table created.Now i nee to
change id's Datatype is to be Varchar2(15). now
Alter table emp modify(id varchar2(15),name varchar2(20),
salary number(9,2));
Whether it will work or returns error? post answer with
explanation.
Answer Posted / nilesh
It will not work,
If u have data in a table and u have to change data type
number to varchar2 then it will gives error, If u change
varchar2(100) column to char(200) it will work,
The number to varchar2 or varchar2 to number will not work
when u have data in table.
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
how to increment dates by 1 in mysql? : Sql dba
What is the difference between left outer join and left join?
Do ddl statements need commit?
What are the string functions in sql?
Can we create table in function?
What is a relationship and what are they?
Is sql easier than java?
what is error ora-03113: end-of-file on communication channel?
What is the use of procedures?
What are the different parts of a package?
what is text? : Sql dba
What are the types of join in sql?
What is sql used for?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
Is sqlite good enough for production?