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
Which data type is a composite type?
Can we write ddl statements in functions?
Can we rollback truncate?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
How can you save or place your msg in a table?
What are predefined functions in sql?
How to add, remove, modify users using sql?
What is fmtonly in sql?
How do you bind variables in pl sql?
What is sql analyzer?
What are the sql aggregate functions?
how mysql optimizes distinct? : Sql dba
Is natural join and inner join same?
- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?
What is a rank in sql?