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.
Answers were Sorted based on User's Feedback
Answer / nzabin
SQL Error: ORA-01439: column to be modified must be empty to change datatype
01439. 00000 - "column to be modified must be empty to change datatype"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Answer / tajuddin
It will work your query 100% will work
Chers
Taj
| Is This Answer Correct ? | 9 Yes | 16 No |
i want insert 10 records from table a to table b. if i m using statement level trigger how many record insert ?in row level trigger how many record inserted???
3 Answers Scope International,
what is heap table? : Sql dba
a. Can you delete data from a View. b. If Yes, can you delete it if there are multiple tables c. If No, can you delete if there is single source table which is joining.
What is an Integrity Constraint?
How do you exit in sql?
What is localdb mssqllocaldb?
Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance
Why do we go for stored procedures?
IF i write before / after insert / update trigger and i do rollback what will happen?
How pl/sql source code can be protected?
What is data control language?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)