Posts

Showing posts from June, 2014

SQL Tutorial

SQL Intro: What is SQL? What is SQL? SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English Query Language)”. Defined, SQL is a query language used for accessing and modifying information in the database. SQL Database Design IBM first developed SQL in 1970s. Also it is an ANSI/ISO standard. It has become a Standard Universal Language used by most of the relational database management systems (RDBMS). Some of the RDBMS systems are: Oracle, Microsoft SQL server, Sybase etc. Most of these have provided their own implementation thus enhancing it's feature and making it a powerful tool. SQL Commands: Few SQL Coding Statements? Few of the sql commands used in sql code programming are: SELECT Statement ,  UPDATE Statement ,  INSERT INTO Statement , DELETE Statement ,  WHERE Clause ,  ORDER BY Clause ,  GROUP BY Clause ,  Subquery Clauses ,  Joins ,  Views ,  GROUP Functions , Indexes ...

SQL Query Interview Questions and Answers with Examples

Interview Questions on SQL are based on following two tables, Employee Table and Employee Incentive Table. Table Name : Employee EMPLOYEE_ID FIRST_NAME LAST_NAME SALARY JOINING_DATE DEPARTMENT 1 John Abraham 1000000 01-JAN-13 12.00.00 AM Banking 2 Michael Clarke 800000 01-JAN-13 12.00.00 AM Insurance 3 Roy Thomas 700000 01-FEB-13 12.00.00 AM Banking 4 Tom Jose 600000 01-FEB-13 12.00.00 AM Insurance 5 Jerry Pinto 650000 01-FEB-13 12.00.00 AM Insurance 6 Philip Mathew 750000 01-JAN-13 12.00.00 AM Services 7 TestName1 123 650000 01-JAN-13 12.00.00 AM Services 8 TestName2 Lname% 600000 01-FEB-13 12.00.00 AM Insurance Table Name : Incentives EMPLOYEE_REF_ID INCENTIVE_DATE INCENTIVE_AMOUNT 1 01-FEB-13 5000 2 01-FEB-13 3000 3 01-FEB-13 4000 1 01-JAN-13 4500 2 01-JAN-13 3500 SQL  Queries  Interview Questions and Answers on "SQL Select" - Examples 1. Get all employee details from the employee table Select * from employee  2. Get First_N...