We often hear terms like DDL, DML, DQL, TCL, and DCL when using relational database management systems (RDBMSs). But what exactly are they?
In this article we’ll look at what DQL stands for, and what it does.
Continue readingWe often hear terms like DDL, DML, DQL, TCL, and DCL when using relational database management systems (RDBMSs). But what exactly are they?
In this article we’ll look at what DQL stands for, and what it does.
Continue readingWe often hear terms like DDL, DML, DQL, and DCL when using relational database management systems (RDBMSs). But what exactly are they?
In this article we’ll look at what DML stands for, and what it does.
Continue readingWe often encounter terms like DDL, DML, DQL, DCL, and TCL when using relational database management systems (RDBMSs). But what do they mean?
In this article we’ll look at what DDL stands for and what it does.
Continue readingThe integer data type is probably one of the more common data types when working with database management systems (and with computing in general). The integer is a numeric data type that allows us to store certain kinds of numbers.
More specifically, an integer is the number zero (0), a positive natural number (e.g. 1, 2, 3, …) or a negative integer with a minus sign (e.g. −1, −2, −3, …). Integers contain no decimal or fractional part.
However, many computing environments distinguish between signed integers and unsigned integers.
Let’s take a look at the difference between signed integers and unsigned integers.
Continue readingWhen creating a table with SQL, we can specify that the table is only to be created if it doesn’t already exist. Doing this prevents any errors from occurring in the event that the table already exists.
Here are some examples of doing this in various RDBMSs.
Continue readingWhen working with SQL, we can use the INSERT
statement to insert a new row into a table. But what if we want to insert more than one row?
Fortunately, we can still use the INSERT
statement. Below is a quick example that inserts multiple rows using SQL.
Probably the most common way of creating a table in SQL is to use a basic CREATE TABLE
statement, along with the table’s definition. But that’s not the only way of doing it.
Below are five options for creating a table when using SQL.
Continue readingWe can use the SQL INSERT
statement to insert a row into a table. We can also use it to insert more than one row.
Below are seven ways to insert multiple rows into a table in SQL. Most of these examples should work in the major RDBMSs, with the possible exception of Oracle. But no worries, I’ve included an example just for Oracle.
Continue readingBelow are examples of using SQL to return the first day of the month across various DBMSs.
This could be the first day of the current month, or the first day of a month based on a given date.
Continue readingThe following examples use SQL to delete duplicate rows that have a primary key or unique identifier column.
Specifically, the examples delete all duplicates except one. So for example, in the case of three identical rows, it deletes two of them and keeps one.
Continue reading