Category Archives: SQL Tutorial

SQL left join

Understand Using the SQL left join

The left Join of SQL The left join is the type of join that returns all rows from the left table (the table in the select from) whereas only matched rows from the other table are retrieved. An example of left join As it returns all rows from the first table/left table, the column values for

How to Create SQL Database: Learn the Syntax

How to create a database In order to work with relational databases, the first thing to do is to create SQL database in the database server of your choice. Whether you are working on the MS SQL server, MySQL database, Oracle etc. you need to ensure that you have the sufficient privileges to create a database

SQL function count

How to use SQL aggregate functions

SQL Aggregate functions The SQL comes up with many aggregate functions that allow you to perform calculations on the columns data and return the aggregated value. These SQL aggregate functions can work in the simple SQL select statement or with the group by clause in the select statement to return single or group based calculated

Learn to create SQL primary and composite keys in 15 minutes

What is primary key in SQL In the last chapter of how to create SQL table, we learned how to create tbl_employee table in our test_db database. We created a table with four columns: emp_name, emp_age, emp_salary, and joining_date. Now, what if two employees with the same names join on the same date? Or there may be scenarios where similar

SQL delete command

3 Examples of SQL Delete from to Learn in 25 Minutes

Learn the Delete command by a Video Tutorial The delete statement A few main points by the delete command are: The delete statement of SQL is used to remove data from tables of the database. The delete statement removes existing data from the tables. With a single delete query in SQL, you can remove whole

SQL min function

SQL Min function with 2 examples

The min() function returns the minimum or lowest value in the given column.
You can use min function in a simple select statement.

SQL between operator

SQL between operator: Learn in 20 mins with 4 demos

Syntax of SQL between operator The general syntax of the between logical operator is: Select * from table_name Where col_name BETWEEN val1 AND val2 Where val1 and val2 can be two numbers, characters or dates. See a between example Between with dates example Watch the Between operator video tutorial of keep reading below: The Between

SQL avg function

Understand the Fundamentals of AVG function of SQL

How to use the SQL Avg function? The general syntax of using SQL average function is: Select avg(numeric_column_name) from table_name Where col_name = value See an example of AVG function A few points about the Avg function The Avg() returns the average value of the given numeric column. You can use the Avg function in the

SQL IN operator

3 Examples to Learn Fundamentals of SQL IN operator

If you have a list of values to match in order to fetch rows from a database table, this is where the IN SQL operator works.
The IN is a logical operator that takes a list of values to be matched to return records.

SQL max function

2 examples of SQL max to easily understand in 15 minutes

What is the max function? The max() function of SQL returns the maximum value in a given column. You can use the Max function in the simple select statement. You can also use the SQL max aggregate function with the group by clause to return maximum values in consolidated data. An example of Sum function Syntax of