About 10,200,000 results
Open links in new tab
  1. sql - How to change a value name during output - Stack Overflow

    Oct 7, 2011 · I am trying to change the name of a stored value when I execute my SQL script: SELECT PERSONNUM, PAYCODENAME, CAST(WFCTIMEINSECONDS AS FLOAT)/3600 AS Total_Hours FROM VP_ALLTOTALS

  2. sql - Rename selected values in query - Stack Overflow

    Jan 8, 2019 · you want to rename permanently in the table, or just change the output for the purpose of display in this particular select query? For the former, use an UPDATE query. For the latter, a SWITCH or nested IIF statement would probably make sense.

  3. ALTER (RENAME) in SQL - GeeksforGeeks

    Apr 14, 2025 · In this article, we will explain how to rename tables and columns in SQL using the ALTER TABLE command, along with practical examples. What is ALTER Command in SQL? The ALTER TABLE command in SQL allows us to modify the structure of an existing table.

  4. How do I REPLACE values in column after querying

    Jul 6, 2016 · I have a column with numeric values. I am querying. SELECT column FROM table WHERE column='1' OR column='2' OR column='3' OR column='4' THEN. REPLACE (column, "1", "ABC"); REPLACE (column, "2", "DEF"); REPLACE (column, "3", "GHI"); REPLACE (column, "4", "JKL") I am not sure if I may be using the semicolons wrong. Please help!

  5. 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.

  6. Is it possible to rename output data? - SQLServerCentral

    Dec 13, 2013 · So, my reporting works, but I want to rename what is viewed in report (if 101.101.101.101, then name is "UniqueName" or add to the name "101.101.101.101 - Unique Name). Rename what? a column?...

  7. How do I rename a column in a database table using SQL?

    Oct 6, 2008 · You can use the following command to rename the column of any table in SQL Server: exec sp_rename 'TableName.OldColumnName', 'New colunmName'

  8. Renaming Values In Sql - Restackio

    Mar 19, 2025 · Learn how to effectively rename values in SQL using Database Design Tools for AI Applications to enhance data management. Using the ALTER DDL command, you can effectively rename columns in your SQL database.

  9. How to Use the Alter Command in SQL: Renaming Tables and …

    Mar 3, 2024 · In SQL Server, the syntax for renaming a table involves using the sp_rename stored procedure instead: EXEC sp_rename 'old_table_name', 'new_table_name'; To rename a column in SQL Server, the process is similar:

  10. How to Rename a Column in SQL: Step-by-Step Guide

    Jun 2, 2023 · In SQL, column renaming can be achieved using the ALTER TABLE statement, which modifies the structure of an existing table. The following are the required steps: Use the ALTER TABLE keyword followed by the table name. Specify the RENAME COLUMN keyword. Provide the current column name and the new column name separated by the TO keyword.