All articles: Data Definition Language (DDL)

Checkout our self-help content, created by our top Experts!
How to modify a stored procedure in MS SQL Server – Querychat
Stored procedures are essential objects when it comes to performing DML operations on an application level. We often need to modify previously created procedures, either due to database or business rules modifications. This article elaborates two ways of modifying a stored procedure in SQL Server: via UI and SQL code...
SQL Database Design Best Practices – Querychat
When designing databases, some guidelines need to be followed in case we want to build an effective and useful database system. This article elaborates on best practices when it comes to SQL Server database design. Database Design Basics Implementation of SQL database structure is a complex process. The process requires...
The Difference Between CHAR, VARCHAR, and TEXT in MySQL – Querychat
In this article, we will discover the difference between character types of MySQL, namely the CHAR, VARCHAR, and TEXT.  Differences in speed between these three MySQL data types will be very difficult to detect until our database grows to quite large volumes. So which one is the easiest to work...
Understanding Pages in SQL Server – Querychat
Pages are essential building units of every SQL database we deal with. In order to design an efficient database, understanding how data will be stored in a database is a must. This article elaborates on the definition of the SQL Server page and introduces us to different page types within...
An Intro to Columnstore Indexes – Querychat
Columnstore indexes are designed for storing and querying wide tables such as fact tables in a data warehouse. They were introduced in SQL Server 2012 version, and Microsoft has kept increasing the benefits of this feature in the newer versions. In this article, we will learn what the columnstore index...
What is Primary and Foreign Key in SQLite – Querychat
In this article, we will find out what are the primary and foreign keys and what is their purpose in SQLite. SQLite primary key The primary key is what makes each row of our records in the database unique. Thanks to the primary key, each record has its own unique...
SQLite: How to Rename a Table or a Column – Querychat
Sometimes we need to change the name of our table because we might find a better name. Likewise, we may need to rename a column, for example, because we might change the purpose of the column and that should be reflected in its name, too.  In this article, we will...
How to Create and Delete the SQLite Temporary Table – Querychat
Often it is impossible to fit long and complex operations into one query. Moreover, during such operations, intermediate data appears. This intermediate data is also often necessary to store, as we might need it later for further operations. Such data can be stored in a temporary table, and in this...
Remove Primary Keys in SQL Server – Querychat
It might happen that we defined a primary key constraint on the wrong column, and then we need to delete (drop) that. In this article, we will see how to drop a primary key in SQL Server using Management Studio and T-SQL. DROP primary key constraint Let’s create two tables:...
How to Add and Drop a Column with SQLite ALTER TABLE Statement – Querychat
The ALTER TABLE in SQLite only allows us to either rename a table or add a column to the table. However, we cannot use that statement for deleting columns in SQLite. In this article, we will find out how to add a column in SQLite using the ALTER TABLE statement...
1 2 13 14