Skip to main content

Posts

Showing posts from March 16, 2017

MOST IMPORTANT QUERIES (90% ASKED IN INTERVIEWS)

MOST IMPORTANT QUERIES (90% ASKED IN INTERVIEWS) 1.Query to find Second Highest Salary of Employee?(click for explaination) Answer:- Select distinct Salary from Employee e1 where 2= Select count(distinct Salary) from Employee e2 where e1.salary<=e2.salary; 2.Query to find duplicate rows in table?(click here for explaination) Answer :- Select * from Employee a where row_id != select max(row_id) for Employee b where a.Employee_num=b.Employee_num; 3.How to fetch  monthly Salary of Employee if annual salary is given?(click here for Explaination) Answer:-    Select Employee_name,Salary/12 as ‘Monthly Salary’ from employee; Click here to get information on ROW_ID 4.What is the Query to fetch first record from Employee table? Answer:-  Select * from Employee where  Rownum  =1; Click here to get What is Rownum? 5.What is the Query to fetch last record from the table? Answer:- Select * from Employee whe...

Core java interview questions and answers

Core java interview questions and answers Core java interview questions play a vital role in java/j2EE interviews. Whether you are fresher or experienced, you are going to face core java interview questions. You can also go through  top java interview programs  for practicing java programs. Here I am providing some important core java interview questions with answers. 1. What do you mean by Platform independence of java? You can write and compile program in one Operating system and run in other operating system. For example: You can compile program in Windows and can run it in Unix. 2. What is difference between JVM, JRE and JDK ? JVM :  JVM stands for Java Virtual Machine. It is virtual machine which actually runs the byte code. JRE :  JRE stands for Java Runtime Environment. It provides runtime environment for java code. It has JVM , libraries such as rt.jar and other files. JDK :  JDK stands for Java development kit. It is superset of JR...