Answers for "update table name in sql"

SQL
0

sql change table name

ALTER TABLE exampletable RENAME TO new_table_name;
Posted by: Guest on October-04-2020
2

modify column name in sql

ALTER TABLE `Table Name` MODIFY COLUMN `Column Name` Datatype(Size);
Posted by: Guest on July-29-2020
2

alter table name sql

-- Microsoft SQL style
EXEC sp_rename 'TableOldName', 'TableNewName';
Posted by: Guest on July-11-2020
1

sql change column name based on value

SELECT CASE lower(col1)
	WHEN 'agree' THEN 'Ok'
    ELSE
        CASE 
            WHEN col2 = 1 THEN 'Ko'
            ELSE 'Maybe'
        END
END AS my_result
FROM table_name;
Posted by: Guest on July-04-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language