sql-tutorials.blogspot.com
SQL Joins - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-joins.html
Saturday, January 20, 2007. The simplest JOIN is a two-table SELECT. That has no WHERE. The number of rows in the result table is equal to the number of rows in the first source table multiplied by the number of rows in the second source table. Is a join with a join condition containing an equality operator. An equijoin combines rows that have equivalent values for the specified columns. Here is an example from the hr schema). It is without the WHERE. Select * from locations, departments;. If you have ma...
sql-tutorials.blogspot.com
SQL Delete - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-delete.html
Friday, January 19, 2007. How to delete all records from a table? Delete from dept;. How to delete specific records from a table? Delete from emp where empno=20;. How to delete duplicate records from the table? Suppose we have a table t1(id integer, name varchar(10). Select * from t1;. Where id not in ( select min(id). Group by name ). BOTH THE BELOW EXAMPLES OF UPDATE AND DELETE USE CORRELATED SUBQUERIES:. Sal = (SELECT MAX(sal). E1deptno = e2.deptno);. Deptno = e.deptno);. Posted by sachin : 12:36 AM.
sql-tutorials.blogspot.com
SQL Views - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-views.html
Thursday, January 18, 2007. A view is a specific representation of data from one or more tables. The tables referred in the views are known as Base tables. Creating a view. Does not take any storage space as only the query is stored in the data dictionary and the actual data is not stored anywhere. The maximum number of columns that an be defined in a view. Are 1000 as in tables. The reasons for using views in applications can be many like;. Renaming the table columns. Statement to create a view:. And re...
sql-tutorials.blogspot.com
SQL Insert - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-insert.html
Thursday, January 18, 2007. Inserting a new row into the dept table. Insert into dept (deptno, dname, loc) values (10,'Apple','. You can omit the column list in the insert statement but then you have to enter those in the same order as they appear in the table and you have o include all the columns in the values. The following example illustrates the use of the "default" keyword while inserting the records. How to create a new table having the same structure as some other table? When sal = 3200 then.
sql-tutorials.blogspot.com
SQL Subqueries - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-subqueries.html
Saturday, January 20, 2007. Are used in the WHERE. Clause of the SQL. Statement. When you nest many subqueries. The innermost query is evaluated first. When you use subquery. In the from clause of the select statement it is called inline view. A subquery. Which is enclosed in parenthesis in the FROM clause may be given an alias name. The columns selected in the subquery. Can be referenced in the parent query, just as you would select from any normal table or view. When you use subqueries. SELECT departme...
sql-tutorials.blogspot.com
SQL Pl/Sql interview Questions - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-plsql-interview-questions.html
Thursday, January 18, 2007. SQl PL/SQL Question 1. How to display row number with records? Select rownum, ename from emp;. SQl PL/SQL Question 2. How to view version information in Oracle? Select banner from v$version;. SQl PL/SQL Question 3. How to find the second highest salary in emp table? Select min(sal) from emp a. Where 1 = (select count(*) from emp b where a.sal. SQl PL/SQL Question 4. How to delete the duplicate rows from a table? Create table t1 ( col1 int, col2 int, col3 char(1) );. What is a ...
sql-tutorials.blogspot.com
SQL Update - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-update.html
Wednesday, January 17, 2007. Set sal = sal*2.25. Where deptno = 30. Set sal = sal*2.25. Where empno in ( select empno from emp 1 ). Posted by sachin : 11:58 PM. Comments: Post a Comment. Subscribe to Post Comments [ Atom. View my complete profile. SQL PL/SQL Interview Questions.
sql-tutorials.blogspot.com
SQL Sitemap - SQL Tutorials
http://sql-tutorials.blogspot.com/2007/01/sql-sitemap.html
Wednesday, January 17, 2007. USING" in SQL Join. ON" in SQL Join. SQL PL/SQL Interview Questions. Posted by sachin : 4:23 AM. Comments: Post a Comment. Subscribe to Post Comments [ Atom. View my complete profile. SQL PL/SQL Interview Questions.
sql-tutorials.blogspot.com
SQL Introduction - SQL Tutorials
http://sql-tutorials.blogspot.com/2006/10/sql-introduction.html
Sunday, January 21, 2007. SQL Structured Query Language. Stands for Structured Query Language and it is generally referred to as SEQUEL. SQL. Is simple language to learn. SQL. Is a Nonprocedural language, as compared to the procedural or third generation languages (3GLs) such as COBOL and C.SQL was developed by IBM in the 1970s. The American National Standards Institute (ANSI) published its first SQL. And again in 1999, termed both SQL99. Statements categories:DDL - Data Definition Language. DML is used ...