1) Create Table query
create table emp(eid number(20),ename varchar2(20),sal number(5))

2) Display nth highest salary from table :

SELECT DISTINCT (a.salary) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.salary)) FROM EMP B WHERE a.salary<=b.salary);

3) Versioning
select banner from v$version

4) Conversion :
select salary "Character",(to_char(to_date(salary,'j'), 'jsp')) "SALARYY" from emp

select ename "Name of Employees" from emp

Comments

Popular posts from this blog

Add Serial no in crystal report without coding

File operations in C# (.net)

SQL – Generate decimal numbers sequence for particular number range