<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6829187271903634461</id><updated>2024-11-08T07:02:39.188-08:00</updated><category term="sql problems"/><category term="Triggers"/><title type='text'>Oraclesteps</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-7567585015538661259</id><published>2014-09-13T04:34:00.004-07:00</published><updated>2014-12-29T23:45:35.097-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Triggers"/><title type='text'>How to update a rows with opposite gender in Sql?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Helvetica, sans-serif; line-height: 18px;&quot;&gt;&lt;b&gt;SQL :&amp;gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;Select Decode
&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;(Gender,Male,Female,Female,Male)
&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;From Table_Name;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/7567585015538661259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2014/09/how-to-update-rows-with-opposite-gender.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/7567585015538661259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/7567585015538661259'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2014/09/how-to-update-rows-with-opposite-gender.html' title='How to update a rows with opposite gender in Sql?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-8676681380228758703</id><published>2012-08-28T05:27:00.004-07:00</published><updated>2012-08-28T05:27:45.882-07:00</updated><title type='text'>what is external tables and how and inwhich case we should use this? </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;external tables are mainly used when we have the data in flat files and we need to import that data into database then we go for external tables.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eg xml files, csv files, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;Using external tables as server face you can define table using position and access data same as structured table, using dml. Perhaps good use is to load external data without use loader with temporal table in order to make validations. You can access records validate it and load directly.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/8676681380228758703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/what-is-external-tables-and-how-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/8676681380228758703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/8676681380228758703'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/what-is-external-tables-and-how-and.html' title='what is external tables and how and inwhich case we should use this? '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-7809202820109138021</id><published>2012-08-27T06:15:00.002-07:00</published><updated>2014-12-29T23:45:10.745-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql problems"/><title type='text'>what is diff bet sub-query and corrrelated sub-query? </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;Sub-query - The inner query execute first, the outer query deprnds on inner query output.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Correlated sub-query - The outer query execute first, the inner query deprnds on outer query result.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A correlated sub-query is where the sub-query part makes reference to values from the outer query.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div&gt;
SELECT emp1.emp_id, emp1.last_name, emp1.job_id, emp1.department_id from employee emp1&lt;/div&gt;
&lt;div&gt;
WHERE EXISTS (SELECT ‘X’ FROM employee emp2 WHERE emp2.manager_id = emp1.emp_ID);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Is a correlated sub-query because of the reference to emp1.emp_ID in the sub- query. The sub-query is evaluated once for each row processed by the outer query.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div&gt;
SELECT e1.employee_number, e1.name FROM employee e1&lt;/div&gt;
&lt;div&gt;
WHERE e1.salary &amp;gt; (SELECT avg(e2.salary) FROM e2.employee);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
Is not a correlated sub-query because the sub-query makes no reference to the values of the outer part of the query.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/7809202820109138021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/what-is-diff-bet-sub-query-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/7809202820109138021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/7809202820109138021'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/what-is-diff-bet-sub-query-and.html' title='what is diff bet sub-query and corrrelated sub-query? '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-9174552954291425729</id><published>2012-08-27T05:56:00.003-07:00</published><updated>2012-08-28T02:41:48.390-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql problems"/><title type='text'>Removing Duplicate Rows from a Table. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Use rowid pseudo column. All you have to do is to keep the latest data (i.e. highest ROWID) and remove other duplicated rows.&lt;br /&gt;SELECT * FROM table1 a &lt;br /&gt;WHERE rowid &amp;lt; (SELECT max(rowid) FROM table1 b&lt;br /&gt;WHERE a.column1 = b.column1 AND etc...);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create table testtt (num number);&lt;br /&gt;&lt;br /&gt;insert into testtt values(111);&lt;br /&gt;insert into testtt values(111);&lt;br /&gt;insert into testtt values(111);&lt;br /&gt;insert into testtt values(111);&lt;br /&gt;insert into testtt values(222);&lt;br /&gt;insert into testtt values(222);&lt;br /&gt;insert into testtt values(333);&lt;br /&gt;insert into testtt values(333);&lt;br /&gt;insert into testtt values(333);&lt;br /&gt;&lt;br /&gt;select * from testtt;&lt;br /&gt;&lt;br /&gt;delete from testtt&lt;br /&gt;where (rowid, num) not in (select max_rid, num&lt;br /&gt;from (select num, &lt;br /&gt;count(num) over (partition by num) cnt, &lt;br /&gt;max(rowid) over (partition by num) max_rid&lt;br /&gt;from testtt)&lt;br /&gt;where cnt &amp;gt; 1);&lt;br /&gt;&lt;br /&gt;select * from testtt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While I doubt this method has any advantages over another, it&#39;s an example:&lt;br /&gt;DELETE FROM table_a&lt;br /&gt;WHERE rowid IN &lt;br /&gt;( SELECT rowid FROM table_a &lt;br /&gt;MINUS &lt;br /&gt;SELECT MAX( rowid ) FROM table_a&lt;br /&gt;GROUP BY column_list )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;delete from table_name where rowid not in (select max(rowid) from table group byduplicate_values_field_name);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;OR&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;highest rowid does not necessarily mean latest data... since space freed from deleting rows might be reused.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; CREATE TABLE t AS SELECT level l FROM DUAL CONNECT BY LEVEL &amp;lt;= 5000;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; DELETE FROM t WHERE l &amp;lt; 5000;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; COMMIT;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t VALUES (5001);&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; COMMIT;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; SELECT max(l) KEEP(DENSE_RANK LAST ORDER BY rowid) as maxrid, max(l) KEEP(DENSE_RANK FIRST ORDER BY rowid) minrid FROM t;&lt;br /&gt;&lt;br /&gt;MAXRID MINRID&lt;br /&gt;---------- ----------&lt;br /&gt;5000 5001&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/9174552954291425729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/removing-duplicate-rows-from-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/9174552954291425729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/9174552954291425729'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/removing-duplicate-rows-from-table.html' title='Removing Duplicate Rows from a Table. '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-8169930926120807508</id><published>2012-08-27T05:53:00.002-07:00</published><updated>2012-08-27T06:23:44.858-07:00</updated><title type='text'>Updating Multiple columns using values from another column.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
update table_name &lt;br /&gt;set (col1,col2,col3)=(select t.col4,t.col5,t.col6 from table_name2 t where something)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;OR&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
create table tgt ( id number /*primary key*/, x number, y number )&lt;br /&gt;/&lt;br /&gt;insert into tgt ( id, x, y )&lt;br /&gt;select level, level, level from dual connect by level &amp;lt; 4&lt;br /&gt;/&lt;br /&gt;create table src ( id number /*primary key*/, x number, y number )&lt;br /&gt;/&lt;br /&gt;insert into src ( id, x, y )&lt;br /&gt;select level+1, level*5, level*5 from dual connect by level &amp;lt; 3&lt;br /&gt;/&lt;br /&gt;commit&lt;br /&gt;/&lt;br /&gt;select * from src;&lt;br /&gt;&lt;br /&gt;ID X Y&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;2 5 5&lt;br /&gt;3 10 10&lt;br /&gt;&lt;br /&gt;select * from tgt;&lt;br /&gt;&lt;br /&gt;ID X Y&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;1 1 1&lt;br /&gt;2 2 2&lt;br /&gt;3 3 3&lt;br /&gt;UPDATE tgt&lt;br /&gt;SET ( tgt.x, tgt.y ) =&lt;br /&gt;( SELECT src.x, src.y&lt;br /&gt;FROM src&lt;br /&gt;WHERE src.id = tgt.id&lt;br /&gt;)&lt;br /&gt;WHERE EXISTS&lt;br /&gt;( SELECT src.x, src.y&lt;br /&gt; FROM src&lt;br /&gt;WHERE src.id = tgt.id&lt;br /&gt;)&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;2 rows updated.&lt;br /&gt;&lt;br /&gt;select * from tgt;&lt;br /&gt;&lt;br /&gt;ID X Y&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;1 1 1&lt;br /&gt;2 5 5&lt;br /&gt;3 10 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;OR&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;comment-body&quot; data-li-comment-text=&quot;&quot;&gt;Provided that you have a unique constraint on join columns, you can directly update the view.&lt;br /&gt;Adding PK to Guru&#39;s example : &lt;br /&gt;ALTER TABLE src ADD CONSTRAINT pksrc PRIMARY KEY (id);&lt;br /&gt;&lt;br /&gt;Update : &lt;br /&gt;UPDATE&lt;br /&gt;(SELECT tgt.id, tgt.x, tgt.y, src.x as srcx, src.y as srcy&lt;br /&gt;FROM tgt&lt;br /&gt;JOIN src ON tgt.id = src.id)&lt;br /&gt;SET x = srcx, y = srcy;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; select * from tgt;&lt;br /&gt;&lt;br /&gt;ID X Y&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;1 1 1&lt;br /&gt;2 5 5&lt;br /&gt;3 10 10&lt;br /&gt;&lt;br /&gt;(But if you do not have the constraint, you get &quot;not key preserved table&quot; error)&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/8169930926120807508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/updating-multiple-columns-using-values.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/8169930926120807508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/8169930926120807508'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/updating-multiple-columns-using-values.html' title='Updating Multiple columns using values from another column.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6829187271903634461.post-1741776716068550046</id><published>2012-08-27T05:48:00.003-07:00</published><updated>2014-12-29T23:47:14.166-08:00</updated><title type='text'>How to track last update date on a particular record without DBA help. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;we can get the last updated date based on the following inbuild function:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;scn_to_timestamp(max(ora_rowscn))&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;create table Test_last_upd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;(a number,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;b varchar2(3) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;begin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;insert into Test_last_upd values (1,&#39;AAA&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;insert into Test_last_upd values (2,&#39;BBB&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;insert into Test_last_upd values (3,&#39;CCC&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;end;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;update Test_last_upd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;set b = &#39;ABC&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;where a =3;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;select TLU.*, scn_to_timestamp(max(ora_rowscn)) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;from Test_last_upd TLU &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;group by a,b;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://oraclesteps.blogspot.com/feeds/1741776716068550046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/how-to-track-last-update-date-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/1741776716068550046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6829187271903634461/posts/default/1741776716068550046'/><link rel='alternate' type='text/html' href='http://oraclesteps.blogspot.com/2012/08/how-to-track-last-update-date-on.html' title='How to track last update date on a particular record without DBA help. '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09041002261585777321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>