About 646,000 results
Open links in new tab
  1. Convert INT to VARCHAR SQL - GeeksforGeeks

    Jul 24, 2024 · The int_column can be changed into a VARCHAR datatype using the CONVERT function, which works similarly to CAST. The length of the resulting VARCHAR column is …

  2. How will changing the mysql field type from INT to VARCHAR

    Get your MySQL server into strict mode before you change the column type and make sure that your varchar (n) column has a large enough n to hold all of the integers when they're …

  3. sql - Cast int to varchar - Stack Overflow

    You will need to cast or convert as a CHAR datatype, there is no varchar datatype that you can cast/convert data to: select CAST(id as CHAR(50)) as col1 from t9; select CONVERT(id, …

  4. select - Convert INT to VARCHAR SQL - Stack Overflow

    Nov 14, 2013 · When I try to do this kind of Select : SELECT CONVERT (varchar (10), field_name) FROM table_name. Or even the normal one like: SELECT field_name FROM …

  5. MySQL CONVERT () Function - W3Schools

    Aug 29, 2017 · Can be one of the following: Converts value to DATE. Format: "YYYY-MM-DD" Converts value to DATETIME. Format: "YYYY-MM-DD HH:MM:SS" Converts value to …

  6. Convert Integer Field to Varchar in MySQL Without Losing Data

    Learn how to convert an integer field into a varchar in MySQL without losing any data. This guide covers methods and best practices for successful conversion.

  7. How to Change a Column Type in MySQL - Devart Blog

    Mar 2, 2024 · Explore MySQL Change a Column Type: A complete guide covering everything from basic syntax to specific examples like INT to VARCHAR, changing VARCHAR length, …

  8. SQL queries to change the column type - SQL Shack

    Sep 22, 2021 · Suppose you want to change the data type of [address] from varchar (max) to nvarchar (1500). Run the following query to change the column type. Verify the changes by …

  9. MySQL CONVERT () Function - MySQLCode

    Dec 31, 2021 · Following is the basic syntax for the CONVERT () function. For example, convert the string number into a float number. Using the CONVERT () function, you can also convert …

  10. How to ALTER COLUMN TYPE in MySQL - bytebase.com

    Mar 17, 2025 · Simple Type Conversions For straightforward conversions: -- Change an integer column to bigint ALTER TABLE orders MODIFY COLUMN order_id BIGINT; -- Change a …

Refresh