SQL DATA TYPES


SQL Data Types | SQL Tutorial | Minigranth

SQL Data Types : Introduction

  • SQL Data Types are important part of attributes present in the tables present as well as the queries which are executed to retrieve data from those tables. SQL data types defines the attributes on the basis of categories to which they belong.
  • The data types are used as per the category of attribute present in the tables. For example : Roll_No of any student will always be an integer. Hence, “Integer” data type will be used for this.
  • Similarly, these data types are categorized into multiple categories based on their usage. We will be covering eight out of them which will be sufficient to cover almost any type of attribute and object present in databases.

SQL Data Types : Types

  • As mentioned above, we will be covering about eight data types which are listed below.

This image describes the classification of various sql data types that can be used in sql.
SQL Data Types

This image describes the syntax and usage along with the example of using the various datatypes in sql.
SQL Data Types : Explanation