What are the data types in MySQL

+1 vote
Hi!!

Can someone tell me what are the data types in MySQL?
Dec 12, 2018 in Database by Sahiti
• 6,370 points
3,249 views

1 answer to this question.

+1 vote

The Data Types of MySQL are as follows:

  • Numeric – This data type includes integers of various sizes, floating-point(real) of various precisions and formatted numbers.
  • Character-string – These data types either have a fixed, or a varying number of characters. This data type also has a variable-length string called CHARACTER LARGE OBJECT (CLOB) which is used to specify columns that have large text values.
  • Bit-string – These data types are either of a fixed length or varying length of bits. There is also a variable-length bit string data type called BINARY LARGE OBJECT(BLOB), which is available to specify columns that have large binary values, such as images.
  • Boolean – This data type has TRUE or FALSE values. Since SQL, has NULL values, a three-valued logic is used, which is UNKNOWN.
  • Date & Time – The DATE data type has: YEAR, MONTH, and DAY in the form YYYY-MM-DD. Similarly, the TIME data type has the components HOUR, MINUTE, and SECOND in the form HH:MM: SS. These formats can change based on the requirement.
  • Timestamp & Interval – The TIMESTAMP data type includes a minimum of six positions, for decimal fractions of seconds and an optional WITH TIME ZONE qualifier in addition to the DATE and TIME fields. The INTERVAL data type mentions a relative value that can be used to increment or decrement an absolute value of a date, time, or timestamp.
answered Dec 12, 2018 by DataKing99
• 8,250 points

Related Questions In Database

0 votes
1 answer

What are the different types of keys used in the database?

There are mainly 5 types of Keys, ...READ MORE

answered Nov 19, 2018 in Database by Sahiti
• 6,370 points
5,926 views
0 votes
1 answer

What are the different types of join in SQL?

Hi Suraj, You have a doubt regarding inner join ...READ MORE

answered May 28, 2019 in Database by sampriti
• 1,120 points
1,298 views
0 votes
2 answers

What are the ways to get the count of records in a table

With the help of the SQL count ...READ MORE

answered Aug 20, 2020 in Database by Okugbe
• 280 points
3,991 views
0 votes
1 answer

What are the different types of index?

There are three types of index namely: Unique ...READ MORE

answered Oct 17, 2018 in Database by Sahiti
• 6,370 points
8,278 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,250 points
1,268 views
0 votes
1 answer

Find values in a comma separated string in a MySQL query

You can add commas to the left and ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
12,896 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
2,317 views
0 votes
1 answer
0 votes
1 answer

What are the ways of Data Import and Export in MySQL Workbench?

There are majorly three ways to export ...READ MORE

answered Dec 14, 2018 in Database by DataKing99
• 8,250 points
2,318 views
0 votes
1 answer

What are the manipulation functions in SQL?

There are three case manipulation functions in ...READ MORE

answered Oct 11, 2018 in Database by DataKing99
• 8,250 points
5,470 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP