About 1,350,000 results
Open links in new tab
  1. Understanding the SQL Decimal data type - SQL Shack

    Jul 15, 2019 · This article aims to walk you through the SQL Decimal data type and its usage with various examples. We will also see how we can exercise this data type in SQL Server to help make SQL developer’s job easier.

  2. decimal and numeric (Transact-SQL) - SQL Server | Microsoft Learn

    Mar 31, 2025 · For example, decimal (5,5) and decimal (5,0) are considered different data types. In Transact-SQL statements, a constant with a decimal point is automatically converted into a numeric data value, using the minimum precision and scale necessary.

  3. SQL Server DECIMAL Data Type - GeeksforGeeks

    Dec 12, 2023 · In SQL Server, when you need numbers to be super precise, like in financial calculations, you use the DECIMAL data type. It's like a special box for storing exact numbers and no rounding off! In simpler terms, decimal is SQL Server's way …

  4. SQL Data Types for MySQL, SQL Server, and MS Access - W3Schools

    In MySQL there are three main data types: string, numeric, and date and time. A FIXED length string (can contain letters, numbers, and special characters). The size parameter specifies the column length in characters - can be from 0 to 255. Default is 1. A VARIABLE length string (can contain letters, numbers, and special characters).

  5. Difference between numeric, float and decimal in SQL Server

    Jun 29, 2009 · In Transact-SQL, numeric is functionally equivalent to the decimal data type. Use the decimal data type to store numbers with decimals when the data values must be stored exactly as specified. The behavior of float and real follows the IEEE 754 specification on approximate numeric data types.

  6. sql - How do I interpret precision and scale of a number in a …

    Numeric precision refers to the maximum number of digits that are present in the number. ie 1234567.89 has a precision of 9. Numeric scale refers to the maximum number of decimal places. ie 123456.789 has a scale of 3. Thus the maximum allowed value for decimal (5,2) is 999.99.

  7. What is the Difference Between Numeric, Float, and Decimal in SQL ...

    Mar 26, 2024 · Explanation: The SQL script creates a table named "STUDENT" with columns "Name" and "Result" of data type DECIMAL (5,2), enforcing fixed precision numbers with 5 total digits and 2 decimal places. Sample data is inserted for students "John" and "Alice" with their respective results, adhering to the specified precision.

  8. SQL Decimal: Guide and Examples - Database Star

    Jan 5, 2024 · Let’s see some examples of creating an SQL DECIMAL data type, including how to insert data into a decimal and how to select data. This example shows how to create a new table with a decimal field. account_id INT, account_name VARCHAR(200), account_balance DECIMAL(20,2) This example uses an account_balance column with a DECIMAL data type.

  9. An Essential Guide To SQL Server DECIMAL Data Type

    To store numbers that have fixed precision and scale, you use the DECIMAL data type. The following shows the syntax of the DECIMAL data type: Code language: SQL (Structured Query Language) (sql) In this syntax:

  10. How to Use SQL Decimal Data Type in Your Database

    Apr 14, 2025 · Defining Precision and Scale. In the context of the SQL Decimal data type, precision and scale play a vital role in defining how numbers are stored and manipulated.. Precision: This is the total count of significant digits a number can hold.For example, in DECIMAL(5, 2), the precision is 5.; Scale: This refers to the count of …

Refresh