what is the difference between sub-query and co-related sub-query?

Sub-query The inner query execute first, the outer query deprnds on inner query output. Correlated sub-query The outer query execute first, the inner query deprnds on outer query result. A correlated sub-query is where the sub-query part makes reference to values from the outer query. ------------------------------------------------------------------------------------------------------------------------------ SELECT emp1.emp_id, emp1.last_name, emp1.job_id, emp1.department_id from employee emp1 WHERE ... Read more

How to Remove Duplicate Rows from a Table

Use rowid pseudo column. All you have to do is to keep the latest data (i.e. highest ROWID) and remove other duplicated rows. SELECT * FROM table1 a WHERE rowid < (SELECT max(rowid) FROM table1 b WHERE a.column1 = b.column1 AND etc...); OR create table testtt (num number); insert into testtt values(111); insert into testtt ... Read more

How to generate ER diagram using Oracle SQL developer

How to generate ER diagram using Oracle SQL developer

Tool Used : SQL Developer version 3.1.07 Schema Used : HR Tables Used : Countries, Departments, Employees, Job_History, Jobs, Locations, Regions Navigate the below path and step by step screen shots: File > Data Modeler > Import > Data Dictionary 1# Select DB Connection and click on next 2# Select Schema/DB you wish to import ... Read more

close button