SQL Tutorial

SQL Constraints

In a real-world scenario, there are cases when we would like to restrict the type of data that is getting stored in the DB table. In order to achieve the restriction on the database, SQL….

SQL Temp Table

In real time scenario, consider that you have read-only access on a table and you have to manipulate some data in it. It is always useful to create a temp table when you want to….

SQL Copy Table

In real time we do face situations where we need to copy data from one table to another table or when we need to create a table from a set of data from the table…..

SQL Truncate Table

SQL Truncate Table Assume a case when we want to have the database but we would like to delete the data of the table. In such cases, TRUNCATE command is used to delete just the….


We have discussed how to create a table in the database, but there are cases when we would like to modify the table that was created. In order to modify a table SQL provides ALTER….

SQL Drop Table

In a real-time situation, there are scenarios when we would like to remove the table from the database. Let us discuss in detail about the process of removing a table from the database. SQL DROP….

SQL Create Table

When we have to store data in relational databases, the first part is to create the database. Next step is to create a table in the database that will store our data. In this tutorial,….

SQL Select Database – MySQL, PostgreSQL, SQL Server

When we work with different databases based on different requirements, we need to select the database before running any SQL command. The SQL command is then run post selection of database. Let us try to….

SQL Alias

There are cases when the column name or the table name that is existing in the database is not so human readable. We can use SQL ALIAS feature to assign a new name to the….

SQL Drop Database – MySQL, PostgreSQL, SQL Server

When we work with the database there are very rare cases when we want to drop the complete database. However, sometimes it’s required to do a complete cleanup and fresh database setup. The meaning of….

Generic selectors
Exact matches only
Search in title
Search in content