Datatypes of SQL

Every field or column in a table is given the database, when table is defined there data types describe a kind of information that can be store in a column. The most common datatypes are:

  • CHAR (size) :- The column defied with CHAR datatype is allowed to store all types of character including letters both uppercase and lowercase letters such as A,B,………,Z and a,b,……..,z and special character like @,#,$,&,etc.
  • VAR CHAR 2 (size) :- This datatypes is similar to a CHAR but con store variable length character string having maximum length determined by size is 200.
  • NUMBER (P.S) :- This datatypes is used to store variable length number data. The P is determines the total number of digits possible to the lift of the decimal point. The S is determines the total number of digits possible to the right of the decimal point.
  • DATA :- This datatypes is used to store date and time information. The DATE datatypes is default format is DD_MM_YYYY.