Tag Archives: SQL

SQL Transaction

If there is a group of SQL commands performed on a database to manipulate the stored data, then all those commands can be treated as a single unit called a transaction. In simple word, we can say that a transaction is a group of SQL queries, and transaction handles all those queries as a single unit. SQL Transaction… Read More »

SQL SEQUENCES

In SQL a Sequence is defined as a Database object which is generally used to generate an integer sequence. In Database tables, Sequences often used to populate the numeric primary key column. However, this can also be done using the AUTO_INCREMENT constraint, but Sequences give more flexibility, and here we can define the integer sequence in a different… Read More »

SQL Sub Queries

In SQL if we write a query inside another query, then it would be considered as a nested, inner query, and subquery. Generally, these subqueries applied using the SQL WHERE clause. SQL Sub Queries Subqueries are basically used to set a condition expression, that’s why the subquery executes before the main query. The data sets returned by the… Read More »

SQL Temporary Tables

Some Relational Database Management Systems(RDBMS), support temporary tables. A Temporary Table is similar to the normal tables present in the Database, like the normal table the temporary table support all the SQL commands, the only difference is the temporary table get deleted as soon as the session of the user or table gets ended. SQL Temporary Tables Temporary… Read More »

SQL Having Clause

Like the WHERE clause HAVING clause is used to put a condition on a statement, in SQL we can not use the WHERE statement with aggregated statements such as GROUP BY, so there we use the HAVING clause to set a condition. SQL Having Clause In sort HAVING is a replace of WHERE clause for the GROUP BY… Read More »

SQL Views

A VIEW is an SQL statement which is used to create virtual tables, although it is just a SQL statement like SELECT, UPDATE, etc. but it holds the data like an actual table. VIEWS provide an alternative way to write a complex query, for instance, if there is a complex query you need to use often when you… Read More »

SQL Indexes

SQL query works fast on a small data sets or table with less number of rows, but in the real world database table contains millions of rows and hundreds of tables and we if try to apply a search query on a table which contains millions of rows then the SQL engine would take a lot of time… Read More »