Explain data types in SQL .
Answers
Numeric
Used to describe numeric values for the field used in the table of database
Alphanumeric
Longvarchar
Char
Varchar
Varchar_ignore case
Binary
Used for storing data in binary formats
Date time
Used foe describing date n time values for the field used in the table of database
Other datatype :stores searialized java objects
Answer :
SQL Data types include :
- CHAR ()
- VARCHAR ()
- TEXT ()
- INTEGER
- FLOAT (size,d)
- DATE
- CHAR () :
It stores letters, numbers and special characters. The size ranges from 0-255 charceters.
- VARCHAR () :
It stores letters, numbers and special characters. The maximum column length in characters in 0-65, 535 characters.
- TEXT () :
Holds a string (only alphabets) with the maximum length of 65, 535 bytes.
- INTEGER :
Used to store integers. The size parameter specified the maximum display width upto 255 characters.
- FLOAT (size,d) :
The total number of digits is specified in the size. The number of digits after the decimal point is specified in the d parameter.
- DATE :
It stores the date and default format is YYYY-MM-DD.