Home » sql » Page 2

Tag Archives: sql

MySQL with Node.js and Express.js

Hello in this tutorial, we will understand how to create a RESTful API in a Node.js environment running on an Express.js server and using a MySQL database. The tutorial will cover the CRUD operations on the API which will execute the corresponding database commands. 1. Introduction RESTful API stands for the standard web service interface used by the applications to ...

Read More »

SQL Between, MySQL Between Dates, Not Between

In this example, we will see how to use the BETWEEN operator included in the SQL. 1. Introduction The BETWEEN is a logical operator, often used in the WHERE clause of the SELECT, UPDATE, and DELETE statements, and gives us the ability to specify whether a value is in a given range or not. Syntax SELECT column_name(s) FROM table_name WHERE column_name ...

Read More »

SQL Subquery – Nested Query in SQL

1. Introduction In this article, we will look at many examples of how to use SQL subquery using MySQL RDBMS. 2. What is the SQL Subquery? A subquery is also called a Nested Query. A Subquery is a Select Query inside another query. Subqueries can be used inside other select, insert, update and delete commands. It can also be used ...

Read More »

SQL Like – SQL Not Like

In this article, we will be exploring the SQL Like and the SQL Not Like operators. These operators help in filtering specific patterns from the columns. 1. About SQL Like & SQL Not Like Let us start with understanding what both these operators are. 1.1 What is SQL Like operator? The SQL Like operator is used to filtering the data ...

Read More »

SQL CASE Statement Example

This example will focus on the SQL Case Statement. In any programming language, you would know that the control statements are the most essential part of the programming language. Just like if-else in any of the programming languages, SQL also has the control statements. 1. About SQL CASE Statement There will be a list of conditions, which can either be ...

Read More »

SQL TIMESTAMP() function Example

Welcome readers, in this tutorial, we will learn how to use the TIMESTAMP() function in SQL. 1. Introduction In SQL, the TIMESTAMP() function enables developers to deal with date-time expressions. The TIMESTAMP() function in SQL enables us to return a date expression from the Date or DateTime expression The TIMESTAMP() function expects Date or DateTime value expression to return the ...

Read More »

SQL DATE() function Example

Welcome readers, in this tutorial, we will learn how to use the DATE() function in SQL. 1. Introduction In SQL, dates are a complicated feature for the developers, and working with them is a complex thing as the format of the date in the database table must match the date format required for the SQL insert operation to work. The ...

Read More »

Hibernate Show SQL Example

This is another example of the hibernate series. Here, we feature a comprehensive article about the Hibernate Show SQL. Hibernate is a feature-rich Object Relational Mapping tool. It offers very fine-tuned debugging capabilities by enabling logs at various levels. In this article, I am going to show how SQL queries can be printed in a hibernate application. 1. Hibernate Configuration ...

Read More »

SQL Temp Table Example

Welcome readers, in this tutorial, we will learn how to use the temporary tables in the database. 1. Introduction A temporary table is a table that, Is only visible to the current session Is automatically dropped when the current session is closed Is permanently not stored in a database; therefore, it is effective for the testing purpose Is only available ...

Read More »

SQL ALTER Table Example

Welcome readers, in this tutorial, we will learn how to ALTER an existing table in the database. 1. Introduction SQL ALTER command is used to modify the structure of a table in the database. This command allows a developer, To add a new column or a constraint to an existing column To drop an existing column or a constraint from ...

Read More »