. With the help of above table EMP, perform the following
operation is sql.
a) Add the new column “DEPTNO”
b) Rename the table
c) Update table
d) Modify the table if column ‘SAL’ whose data type is
number (10) and you want to enter varchar2 (15) . For
example $USD 20 etc.
Answer Posted / guest
create table emp(EMPID number(9),SAL number(10));
Result:creates a table named EMP.
a)alter table EMP add DEPTNO number(9);
Result:a new coloumn DEPTNO is added to the existing table EMP.
b)alter table EMP rename to EMP-RENAMED;
Result:renames the table name EMP to EMP-RENAMED.
c)update EMP-RENAMED
set SAL=SAL+10000
where EMPID>=xxxx;
Result:updates the salaries of Table emp depending upon the condition.
d)alter table EMP-RENAMED modify SAL varchar2(15);
Result:alters the SAL coloumn datatype to varchar2.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Differevce between arrays and array builders?
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?
where is available in this mantis toturials?
what is difference between input parameter and output parameter.
how to convert infix expression to prefix expression?
Iam using Microsoft Visual Studio to create a system for mobile store I want to know how to calculate mobile price that the customer buy and how to reduce quantity from the data base that we have for mobile .And also how to calculate revnue for each mobile and revnue for the total mobile
can we extend a class having only one parameterised constructor.Suggest the process to do it.
can we allocate memory for interface? if no then why?
what is the difference between Windows application and Unix application?
how to remove header and footer in jcl using sort utility
please any one pass file aid,xpeditor and endeavor tools
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
what is the use of occurs 10 or (any number) in the internal table declaration with header line.