Nov 24, 2008

Time ; Avoid duplicate

select DBMS_UTILITY.GET_TIME from dual;

select * from v$timer;

----------------------------------------

Avoid duplicate

To avoid duplicate rows there are three steps

1) Use DISTINCT Keyword
2) Use UNIQUE Keyword
3) Use GROUP BY Keyword

Examples

1) Select distinct vcname,empcode,deptcode,addr,age,phoneno from hr_emp_dup_mast;
2) Select unique vcname,empcode,deptcode,addr,age,phoneno from hr_emp_dup_mast;
3) Select vcname,empcode,deptcode,addr,age,phoneno from hr_emp_dup_mast
group by vcname,empcode,deptcode,addr,age,phoneno;

No comments: