All articles: Data Definition Language (DDL)

Checkout our self-help content, created by our top Experts!
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...
Create Composite Primary Keys in SQL Server – Querychat
When creating the primary key for a table, we might need to look at more than a single column. A primary key can consist of several attributes that together provide a unique identifier for our records, called "composite key". In this article, we will learn about composite primary keys and...
How to Encrypt and Decrypt Passwords Using Passphrases in SQL Server – Querychat
In this article, we will learn how to encrypt and decrypt passwords with a passphrase in SQL Server along with examples of storing the encrypted and decrypted passwords in a table. When we create a password, it can be stored in encrypted form with a series of characters or unique...
How to Set and Change Passwords on MySQL Users – Querychat
In this article, we learn how to set passwords on MySQL users along with examples of changing the password using the SET PASSWORD, ALTER USER and UPDATE statements. Providing passwords to MySQL users is intended to make the database safer when accessing objects in the database. Passwords on MySQL users...
MySQL FLOAT vs DOUBLE vs DECIMAL- Querychat
In this article, we will talk about three different floating types in MySQL: FLOAT, DOUBLE, and DECIMAL. We will discuss their distinctive features and illustrate them with an example, that will compare FLOAT vs DOUBLE vs DECIMAL types.  What are the floating types? These data types are used to indicate...
Can SQL Server manage the longest phone number in the world? – Querychat
In this article, we will cover a common question about the SQL Server that goes around the Web, which is if the SQL Server can manage the longest phone number.  First, let us check how a phone number is assembled. A phone number forms part of a telephone numbering plan,...
What is SQL Fiddle?– Querychat
In this article, we will check what SQLfiddle is, the basics of the tools that it provides, and how it works. Sometimes we do not have access to a local SQL testing engine. SQLfiddle.com is one of the online options to test different SQL versions.  SQL has several online testing...
1 2 3 13 14