All articles: Data Definition Language (DDL)

Checkout our self-help content, created by our top Experts!
MySQL Stored Function – Querychat
MySQL provides stored functions that contain a set of SQL statements to perform an operation and return the value of an expression. That can be a flexible way for us to manipulate and define data according to our needs. The article describes step-by-step how to create and utilize MySQL stored...
MySQL increment – Querychat
This tutorial helps you to understand what AUTO_INCREMENT is and what syntax in MySQL it has, and why we use it. It also explains how to create it in one of the most popular MySQL Graphical User Interfaces (GUI) tools called MySQL Workbench. MySQL AUTO_INCREMENT To create a sequence of...
MySQL Key constraint guideline – Querychat
A FOREIGN KEY is a reference link to establish a one-many relationship between two tables.  This article will explain the usage of FOREIGN KEY constraints with a few illustrations. Before getting into details, for those who are looking for “How to create FOREIGN KEY in MySQL?”, here is an example...
How to rename MySQL table – Querychat
There are occasions in system development and even in operations that require changing the name of database tables. The need arises either because of a new governance requirement or because they are named incorrectly during the development phase. Renaming tables may also be required because the new DBA (Database Administrator)...
How to comment SQL code – Querychat
Comments in SQL are necessary and very helpful just like when we are working with any programming language like PHP, C#, and Javascript.That is why in this article, we will learn how to make comments in MySQL. It is very important to add comments to sections like stored procedures in...
MySQL unique key constraint – Querychat
A unique key is a set of single or multiple columns of a table that uniquely identifies a record in the table. A Unique Key assures that the value in the column will be unique throughout the table. Note: In MySQL, we can have multiple ‘NULL’ values to the UNIQUE...
How to remove tables in SQL Server – Querychat
In this tutorial, we learn how to use the DROP TABLE statement to delete tables from a database in SQL Server. We also learn how to remove both tables with foreign key constraints and all tables from the database. SQL Server DROP TABLE statement To remove a table from a...
Set DEFAULT values in MySQL – Querychat
The MySQL DEFAULT keyword is a database CONSTRAINT or RULE that is applied when inserting new records into a table. If the value is not provided to any column while inserting a new row in the table, the default value will be used instead. In this article, we will explain...
Create Table in MySQL Database using SQLite Tool – QueryChat
SQLite is an in-process database that has a relatively small code library size. Unlike other various databases which are server-based, SQLite is file-based. This article will provide step-by-step information on how to start SQLite and create tables using SQL commands.  The Beginning in SQLite SQLite delivers a simple tool on...
Set Constraints in SQL Database Table – QueryChat
Data stored in database tables must have correct and valid data at all times, to ensure that systems are working as expected. Data validation can be done either through the software application code or database constraints. This article will show the benefits of using SQL Data Constraints to protect incorrect...
1 2 13 14