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 / shailesh j

If column contains data then we can only modify size of
column without changing its data type. But if the column is
empty then we can modify its size as well data type.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1136


What is delimiter in pl sql?

582


What is difference between my sql and sql?

527


what are the types of subquery? : Sql dba

584


Explain what is a database?

645






Why do we need cursor in pl sql?

643


What is using in sql?

558


How do you know if a relationship is 2nf?

516


How do you change a value in sql?

549


Write an sql query to select all records from the table?

553


What are aggregate functions in sql?

620


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

552


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

596


What is difference between stored procedures and application procedures?

567


what are the 'mysql' command line options? : Sql dba

554