ALLInterview.com :: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
Categories >> Software >> Databases >> SQL PLSQL
 


 

 
Question How can we Get the Updated Rows? ie, There is 100s of Rows i
updated the Rows who have salary 5000. then i want to select
the Updated Rows. How can we achieve it?
 Question Asked In Companies :: Fidelity, KCP,     < I also faced this Question! >
 Question Submitted By :: praveengnr
  Answer Posted By  
 
Answer
create table t1 as select * from emp where 1=2;

create or replace trigger t1
after update on emp
for eachrow
begin
insert into t1
values(empno,'ename',job,'hiredate',sal,comm,deptno);

end;
after create trigger
then u updated.

Is This Answer Correct ?    4 Yes 5 No


 
  mahesh
 
View All Answers
 
 
Please Help Members By Posting Answers For Below Questions
 
 Question Views   Select
 
Difference between global and parameter variables? 94
Describe the Index, Types of index, At what situation we have used? Which one s better than others? 466
how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OBS Name Sal 105 E 5000--> 105 E 5000 102 B 2000 104 D 4000 103 C 3000 101 A 1000--> 104 D 4000 1636
when MSQL8.0 is in market 482
What is the use of time stamp in select statement? 115
Maximum how many triggers can we use in trigger and How to find out how many records it fetched. 127
What packages(if any) has oracle provided for use by developers? 2266
GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error? 1156
what is the difference between trigger and constraint? 2050
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 557
C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September. 824
what is the bond code in materialized view? 987
Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)? 1505
What is the criteria while applying index to any column on any table. 411
How global cursor can be declare with dynamic trigger ? 110
E-Mail New Answers        Answer Selected Questions