About 24,100,000 results
Open links in new tab
  1. SQL Format Number with CAST, CONVERT and more

    Dec 27, 2024 · Use SQL format number functions like CAST, CONVERT, ROUND, CEILING, FLOOR and FORMAT for number formatting in SQL.

  2. SQL ALTER TABLE Statement - W3Schools

    SQL ALTER TABLE Statement. The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

  3. How to Modify Existing Data in SQL? | GeeksforGeeks

    Dec 17, 2024 · The ALTER TABLE statement in SQL is a powerful command used to modify the structure of an existing table without affecting its data. It enables changes like adding, dropping, renaming or altering columns in the table.

  4. How do I alter the precision of a decimal column in Microsoft SQL ...

    Sep 23, 2008 · ALTER TABLE (Your_Table_Name) MODIFY (Your_Column_Name) DATA_TYPE(); For you problem: ALTER TABLE (Your_Table_Name) MODIFY (Your_Column_Name) DECIMAL(Precision, Scale);

  5. How to Format Numbers in SQL - Database.Guide

    Nov 17, 2021 · SQL Server has the FORMAT() function, which works much like Oracle and PostgreSQL’s TO_CHAR() function, in that it enables you to format numbers based on a format string: SELECT FORMAT(123456.789, 'N') AS "Number", FORMAT(123456.789, 'P') AS "Percent", FORMAT(123456.789, 'C') AS "Currency";

  6. How to Modify a Column's Data Type in SQL - w3resource

    Feb 10, 2025 · Learn how to change a column's data type in SQL using ALTER TABLE. Step-by-step guide with real-world examples and key considerations.

  7. SQL Server ALTER TABLE ALTER COLUMN By Examples

    SQL Server allows you to perform the following changes to an existing column of a table: To modify the data type of a column, you use the following statement: ALTER COLUMN column_name new_data_type(size); Code language: SQL (Structured Query Language) (sql)

  8. sql server - How to change data type of a column in an SQL

    ALTER COLUMN ROE DECIMAL(20,2) -- or whatever precision and scale you need..... See the freely available MSDN documentation on what exactly the precision, scale and length in decimal numbers are and what ranges of values are possible. how to …

  9. SQL CAST Function in SQL Server – Syntax, Examples, and Best …

    Mar 31, 2025 · ANSI SQL (portable) SQL Server-specific : Formatting Support : No : Yes (for date & number formatting) Portability : Works across databases (SQL Server, PostgreSQL, MySQL, etc.) Works only in SQL Server : Syntax : CAST(expression AS data_type) CONVERT(data_type, expression [, style]) Use Case : Best for writing cross-platform SQL queries

  10. 4 Functions to Format a Number to 2 Decimal Places in SQL Server

    Feb 9, 2022 · Below are four functions that can be used to format a number to two decimal places in SQL Server. The most obvious way to do it is to convert the number to a decimal type. Two functions that can do this for us is CAST() and CONVERT(). Here’s an …

Refresh