Home » Core Java » sql » Page 5

sql

SQL LIMIT Clause Example

1. Introduction   In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is also called “sequel” and it stands for Structured Query Language. SQL first appeared in 1974 and Donald Chamberlin and Robert Boyce designed it. It is based upon relational algebra and tuple-relational ...

Read More »

How to Kill MySQL Process

This article is to describe how to kill a MySQL process and how to use long-running queries using a few commands on the terminal. 1. Introduction MySQL has tools to help us to manage and enhance our database performance. As an example, when a heavy query is executed on the database, it does a lot of issues like delay in ...

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 INSERT INTO SELECT Statement Example

In this article, we will explain SQL INSERT INTO SELECT Statement through examples. You might have used a ‘select’ statement, and the ‘insert into’ statement in SQL separately. The select statement is used to fetch data from the database whereas the ‘insert into’ statement inserts data into the table. In this particular example, we will learn the usage of the ...

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 »

SQL Constraints Example

Welcome readers, in this tutorial, we will understand the different SQL Constraints that maintain the data integrity inside a database table. 1. Introduction SQL Constraints are the restrictions that help maintain the data integrity inside a database table. Constraints can be divided into column level (i.e. limiting only column data) or table level (i.e. limiting whole data in a database ...

Read More »

SQL Clone Database Example

Welcome readers, in this tutorial, we feature a comprehensive article in SQL clone database. Specifically we will understand how to clone an existing database and its content. 1. Introduction In SQL, Database Cloning represents a feature of ensuring backup of all or specific databases. The feature is implemented for purposes, Data restore that was mistakenly modified or deleted For application ...

Read More »

SQL Primary Key Example

Welcome readers, in this tutorial, we will understand the SQL Primary Key column that uniquely identifies a tuple in the database table. 1. Introduction SQL Primary Key is a column or multiple columns that uniquely identify a tuple in the database table. It contains unique values but cannot have null or duplicate It consists of multiple columns known as a ...

Read More »

SQL Data Types Tutorial

1. Introduction SQL is the language used to communicate with Relational Databases such as MySQL, Oracle, MS SQL Server, PostgreSQL, etc. In this post, we will examine the various SQL Data Types and provide examples for MySQL, which is the most widely used open-source database. This post requires some knowledge in SQL and a tutorial for a complete understanding of ...

Read More »