Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

What is SQL Data Types and its types?

SQL data types are used to define the type of data that can be stored in a table column. Each data type is associated with a specific set of values and operations.

SQL (Structured Query Language) supports various data types to define the type of data stored in database tables. Here are some common SQL data types:

  1. Numeric data types:
    • INT or INTEGER: Represents whole numbers.
    • SMALLINT: Represents smaller whole numbers than INT.
    • BIGINT: Represents larger whole numbers than INT.
    • DECIMAL or NUMERIC: Represents fixed-point numbers.
    • FLOAT or DOUBLE: Represents floating-point numbers.
  2. Character data types:
    • CHAR: Fixed-length character strings.
    • VARCHAR: Variable-length character strings.
    • TEXT: Variable-length character strings with large storage capacity.
  3. Date and time data types:
    • DATE: Represents a date value.
    • TIME: Represents a time value.
    • DATETIME or TIMESTAMP: Represents both date and time values.
    • INTERVAL: Represents a time interval.
  4. Boolean data type:
    • BOOLEAN or BOOL: Represents true or false values.
  5. Binary data types:
    • BLOB: Represents binary large objects for storing large amounts of binary data.
    • BINARY: Fixed-length binary strings.
    • VARBINARY: Variable-length binary strings.
  6. Other data types:
    • ENUM: Represents a predefined set of values.
    • SET: Represents a set of predefined values.
    • JSON: Stores JSON (JavaScript Object Notation) data.

These are just some of the commonly used data types in SQL.

Related Posts

What is SQL and How SQL Works & Architecture?

What is SQL? SQL stands for Structured Query Language, which is used to communicate with the database in the form of queries. SQL is essential for working Read More

Read More

What are SQL Operators and Why Importance of SQL Operators in Queries?

What are SQL Operators? SQL operators are special symbols used in conjunction with keywords to create complex queries. These operators are used to perform various mathematical and Read More

Read More

What is SQL ?

SQL stands for structure query language, Which is used to communicate with database in form of queries. In another, SQL stands for Structured Query Language. It is Read More

Read More

What is Data Base Management System?

Data Base: Collection of data will be stored in the data base. A database is an organized collection of data that is stored and managed in a Read More

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x