TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    MySQL

    MySQL Numeric Data types

    Overview

    In this tutorial, we will learn MySQL Numeric Data types. MySQL supports many data types to store numeric data like
    integer data types, floating-point types, fixed-point types, etc.

    Integer Data Types

    The integer data type is used for storing whole numbers.
    Whole numbers do not have decimal digits. For example, 25 is a whole number and 32.7 is not a whole number.

    The following is the list of numeric data types:

     

    Integer Data type Description
    TINYINT Used for very small integer
    SMALLINT Used for small integer
    MEDIUMINT Used for medium-sized integer
    INTEGER Used for normal integer
    BIGINT Used for large integer

    Floating-Point Data Types

    The floating-point data types are used to represent approximate-value numbers that have an integer part, a fractional part, or both. The floating-point data types are:

    FLOAT – Single-precision floating-point number
    DOUBLE – Double-precision) floating-point number

    These types represent values in the native binary floating-point format (IEEE 754).

    Syntax

    The FLOAT data type is assigned using the syntax:

    FLOAT (N, D)

    N is the maximum number of decimal digits and D is the number of digits following the decimal point. A single-precision floating-point integer is accurate to approximately 7 decimal places.

    The DOUBLE data type is assigned using the syntax:

    DOUBLE (N, D)

    N is the maximum number of decimal digits and D is the number of digits following the decimal point. A double-precision floating-point integer is accurate to approximately 15 decimal places.

    Fixed-Point Data Types

    The fixed-point data type in MySQL is DECIMAL. DECIMAL data type is used to represent exact-value numbers that have an integer part, a fractional part, or both.

    All values of the DECIMAL column have the same number of decimal places and are stored exactly as specified.

    The DECIMAL data type is assigned using the syntax:

    DECIMAL (N, D)

    N is the maximum number of significant digits that can be stored and D is the number of digits following the decimal point (from 1 to 255).

    —

    MySQL Tutorials

    MySQL Tutorials on this website:

    https://www.testingdocs.com/mysql-tutorials-for-beginners/

    For more information on MySQL Database:

    https://www.mysql.com/

    Related Posts

    Stellar Converter for Database Tool

    MySQL /

    Stellar Converter for Database

    Stellar MySQL Log Analyzer

    MySQL /

    Stellar Log Analyzer for MySQL

    Stellar Repair for MySQL

    MySQL /

    Stellar Repair for MySQL

    MySQL /

    How to secure your SQL Database: Tips and Tricks

    Stellar Converter for Database

    MySQL /

    Database Converter Tools

    ‹ MySQL String Data Types› MySQL Temporal Data Types

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com