SQL Data Types for Dummies!

Опубликовано: 28 Сентябрь 2024
на канале: Database Dive
21
0

This SQL tutorial for dummies will walk you through a bunch of data types applicable to relational database management systems such as MySQL Server (this includes MariaDB Server and Percona Server), or SQL Server.

This SQL tutorial for dummies will tell you that SQL works based on database management systems (PostgreSQL, MySQL, SQL Server, SQLite, etc.) and those database management systems have databases and tables. Those tables consist of columns and rows.
In a relational database (relational databases include MySQL and its flavors like MariaDB or Percona Server, also SQL Server and others), all rows that form a part of a table reside in a column. A single row is often called a value and those values have data types assigned to columns that they reside in.

A list of formal data types recognized by the ANSI/ISO SQL standards committee are as follows:

Exact Numeric Values:
INTEGER
SMALLINT
BIGINT
NUMERIC
DECIMAL

Approximate Numeric Values:
REAL
DOUBLE PRECISION
FLOAT
DECFLOAT

Binary Strings:
BINARY
BINARY VARYING
BINARY LARGE OBJECT

Boolean:
BOOLEAN

Character Strings:
CHARACTER (CHAR)
VARIABLE LENGTH CHARACTER (VARCHAR)
CHARACTER LARGE OBJECT
NATIONAL CHARACTER
NATIONAL CHARACTER VARYING
NATIONAL CHARACTER LARGE OBJECT

Datetimes:
DATE
TIME WITHOUT TIMEZONE
TIMESTAMP WITHOUT TIMEZONE
TIME WITH TIMEZONE
TIMESTAMP WITH TIMEZONE

Intervals:
INTERVAL DAY
INTERVAL YEAR

Collection Types:
ARRAY
MULTISET

Other Types:
ROW
XML

Various database management systems may support additional data types derived from these data types.

Enjoyed this SQL tutorial for dummies? Make sure to subscribe to this database tutorial channel to see more database tutorials for relational and NoSQL database management systems!

Music:
Moonwalk by Jay Someday:   / jaysomeday  
Licensed under Creative Commons — Attribution 3.0 Unported — CC BY 3.0.
Free Download / Stream: https://tinyurl.com/ydfktbaa
Music promoted by Audio Library: https://tinyurl.com/3m5w8zt7

#shorts #reels #sql #database #programming #data #development