Category: Misc
-
SQL INDEX
The Index in SQL is a special table used to speed up the searching of the data in the database tables. It also retrieves a vast amount of data from the tables frequently. The INDEX requires its own space in the hard disk. The index concept in SQL is same as the index concept in…
-
CRUD Operations in SQL
As we know, CRUD operations act as the foundation of any computer programming language or technology. So before taking a deeper dive into any programming language or technology, one must be proficient in working on its CRUD operations. This same rule applies to databases as well. Let us start with the understanding of CRUD operations…
-
SQL BETWEEN
The BETWEEN is a logical operator in SQL, which fetches the records from the table within the range specified in the query. We can use this operator to select numbers, text, or dates. The BETWEEN operator in SQL includes the starting and ending values. BETWEEN operator is used in the WHERE clause with the following four SQL…
-
TIME Datatype in SQL
Let us see few practical examples to understand this concept more clearly. We will use the MySQL database for writing all the queries. To create a table in the database, we will first select a database in which we want to create a table. Then we will write the following query to create a table:…
-
SQL ORDER BY DATE
Let us see few practical examples to understand this concept more clearly. We will use the MySQL database for writing all the queries. Consider we have created a table named as employees in MySQL database with the following data: ID Name Salary Joining_Date DOB 1 Rohit More 50000 2020-02-08 1991-01-28 18:06:08 2 Kunal Mohite 34000…
-
Savepoint in SQL
Let us see the practical examples to understand this concept more clearly. We will use the MySQL database for writing all the queries. To create a table in the database, first, we need to select the database in which we want to create a table. Then we will write a query to create a table…
-
SQL get month from the date
Let us see few practical examples to understand this concept more clearly. We will use the MySQL database for writing all the queries. Then we will write the following query to create a table in the ‘dbs’ database: In the above query, the column named ‘DateOfBirth’ will store the date since the data type of…
-
SQL Concatenate
There may arise a situation when you need to join the strings stored in two different columns of a single table. To connect such strings, string concatenation is performed in SQL using the CONCAT() function. Let us see few practical examples to understand this concept more clearly. We will use the MySQL database for writing all the…
-
Commit and Rollback in SQL
Note: One thing to note about the rollback command is that if you have already committed your recent changes, you cannot rollback your transaction. In that case, you can only roll to the last permanent change. Let us see few practical examples to understand this concept more clearly. We will use the MySQL database for…
-
SQL Like
The LIKE is a logical operator in the Structured Query Language. This SQL operator is used in the WHERE clause with the following three statements: It filters the records from the columns based on the pattern specified in the SQL query. Following are two wildcard characters that are used either in conjunction or independently with the SQL…