You have to use oracle9i
Try this,Sure it will work
Select * from tablename
group by rollup(id);
Type: Posts; User: chaitueeturi; Keyword(s):
You have to use oracle9i
Try this,Sure it will work
Select * from tablename
group by rollup(id);
That is not possible in oracle.But u can try the following
Just u create a view on that particular table and keep the order of the columns in your view as you required.And use that view when ever...
try below one
considering emp s reference table,if deptno of type varchar
update emp
set deptno=decode(deptno,10,20,20,30,30);
generally a view will be stored as a statament in database.
If u want retrieve data using this view,then it replaces the view with a select statement and it will be executed on the tables on which u...
if we wnt to change a column defintion first store all the data in that column to some where and set all the values to be modified in that column to null and then follo below mentioned
sql> Alter...
try this
select * from emp
where (select count(distinct sal) from emp s
where s.sal>=m.sal)+1=788;
not sure but try below one
considering emp s reference table,if deptno of type varchar
update emp
set deptno=decode(deptno,10,'ten',20,'twenty','thirty');
use the below one after executing pl/sql block
sql> show errors
it displays errors along with line numbers
the recently created trigger will be fired first
suppose u created trigger t1 and then t2 for the same instant
here t2 will be fired first and then t1
There are 3 types of roles to grant privileges depending upon requirement
1.Resource
2.Connect
3.DBA
Among these DBA cotains all the privileges,try the following one
sql> Grant DBA to...
Having clause can occur without groupby clause.But the entire records in the table are considerd as single group and we can get the corresponding o/p
observe this eg:
select sum(sal) from emp...
it is in object in database which is automatically executed at the specified event.
3 types triggers are there
DML triggers
DDL triggers
Database triggers
just give a name to constraint and try this it will work
select table_name from user_constraints
where constraint_name='<constraintname>';
we know views are stored as select statement in database
these are mainly useful to provide security to the data and to control the n/w traffic.
in realtime views play the major role
1.select * from emp m
where (select count(distinct sal) rank from emp s
where s.sal>m.sal)+1=22;
2.delete from emp
where empno=(select empno from (select rownum rn,emp.* from emp)...
if we have performed a DML operation either we have to use commit or we have to perform DDL operation else the changes can not be made in database.It appears to u that is there but others clients can...
There are some cursor attributes.If we state any DML statement inide a pl/sql block,implicitely a cursor sql%rowcount will be created which consists of the records satifying the DML statement,and DML...
if we define a unique or primary key on a column in a table automatically a unique index will be created.No need to define manually.
emp_id and acc_id should be unique and should not be null.so the requirement of primary key arises.if this table does not need any child records
we can define primary key on either of the columns.if...
actually no need to rearrange these columns
if at all u want to do this to my known knowledge this can be done in two steps
step1:- alter table <oldtablename> add
...
count syntax is count(<exp>/*)
if we use count(<exp>) it returns the number of not null values in a group of values
if we use count(*) it returns the count of values in a group of values
just...
a view is stored as a select statement in database.it provides security for both data and table.That means if we drop view no damage occurs to table.And the n/w traffic can be controlled,because a...