Turn Desktop View Off
by Dinesh Thakur

The SQL WHERE Clause is used when you want to retrieve specific information from a table excluding other irrelevant data. In a where clause simple conditions based on comparison operators can be combined using the logical connectives and, or, and not to form complex conditions. Conditions may also include pattern matching operations and even subqueries.



 
by Dinesh Thakur

A VIEW is a virtual table, through which a selective portion of the data from one or more tables can be seen. Views do not contain data of their own. They are used to restrict access to the database or to hide data complexity. A view is stored as a SELECT statement in the database. DML operations on a view like INSERT, UPDATE, DELETE affects the data in the original table upon which the view is based.

 
by Dinesh Thakur

Subquery or Inner Query or Nested Query is a query in a quary, A subquery is usually added in the WHERE Clause of sql statement. Most of the time, a subquery is used when you now how to search for a value using a SELECT statement, but do not know the exact value.

 
by Dinesh Thakur

Quite often it is required to make changes or modifications in the records of the table, so in order to make these changes, the UPDATE statement is used. With this statement, the user can modify the existing data stored in the table. It can update zero or more rows in a table. To update rows in table, it must be in your own schema or you must have update privilege on the table.

 
by Dinesh Thakur

The SQL SELECT INTO statement can be used to retrieves data from a table and inserts it to another database table. The SQL SELECT INTO statement used to create backup copies of tables.

 
by Dinesh Thakur

A select statement is used to select information from one or more tables. SQL statements can be on one or more lines. SQL is not case sensitive. SELECT is the same as select. SQL SELECT Syntax



 
by Dinesh Thakur

A trigger is a PL/SQL block structure which is fired when a DML statements like Insert, Delete, Update is executed on a database table. A trigger is triggered automatically when an associated DML statement is executed. In other words Triggers are a stored PL/SQL code block attached and executed by an event which occurs to a database table.

 
by Dinesh Thakur

In General all the rows in the result table have not been ordered in any way. SQL just retrieved the rows in the order in which it found them in the table. Often, however, we need to list the output in a particular order.

 
by Dinesh Thakur

The INSERT statement is used to add new row to a table. To insert new row(s) into a table, the table must be in your own schema or you must have INSERT privilege on the table. Only one row is inserted at a time with this syntax. You can insert literal values (26.5, 'DINESH), expres­sions containing operators and functions, null values etc. only.

 
by Dinesh Thakur

The SQL GROUP BY clause is used along with the SQL aggregate functions and specifies the groups where selected rows are placed. When one or more aggregate functions are presented in the SQL SELECT column list, the SQL GROUP BY clause calculates a summary value for each group.

 
by Dinesh Thakur

The SQL DISTINCT query is used with the SELECT keyword retrieves only unique data values depending on the fields you have specified after it. To illustrate it we use emp table as shown below.

Select ename from EMP;

 
by Dinesh Thakur

The DELETE statement is used to delete rows in a table. To do so, we can use the DELETE FROM command. An SQL DELETE statement removes one or more records from a table. A subset may be defined for deletion using a condition, otherwise all records are removed.

 
by Dinesh Thakur

Oracle uses work areas to execute SQL statements and store processing information. A PL/SQL construct called a CURSOR lets you name a work area and access its stored information. A Cursor in its simplest form can be thought of as a pointer to the records in database table or a virtual table represented by the result of a SELECT statement.



 
by Dinesh Thakur

The create table statement is used to create a new table. The CREATE TABLE statement defines a table. The definition must include its name and the names and attributes of its columns. The definition can include other attributes of the table, such as its primary key or check constraints. This statement comes under the DDL statement.

 
by Dinesh Thakur

A sequence is a database object that generates numbers in sequential order. Applications most often use these numbers when they require a unique value in a table such as primary key values. Some database management systems use an "auto number" concept or "auto increment" setting on numeric column types. Both the auto numbering columns and sequences provide a unique number in sequence used for a unique identifier.

 
by Dinesh Thakur

SQL (Standard Query Language) is a language for manipulating databases developed in the 70s by IBM. All data management systems use SQL to access data or to communicate with a data server. RDBMS is the core platform for SQL, and for all other modern database languages such as  Oracle, MS SQL Server, IBM DB2, MySQL, and Microsoft Access, PostgreSQL, SQLite, Firebird, and many more. SQL (Standard Query Language) is born as a result of the mathematical work of Codd, who founded the work of relational databases, three types of manipulations on the database: