Search
 
SCRIPT & CODE EXAMPLE
 

SQL

change column names mssql

--The following example renames the column TerritoryID in the table Sales.SalesTerritory to TerrID in the AdventureWorks database.

EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN';
Comment

changing column names in sql query results

SELECT NAME AS "Employee Name" FROM PEOPLE;

SELECT p.NAME AS "Employee Name", s.SALARY AS "Employee Salary"
FROM PEOPLE p
JOIN SALARIES s ON p.ID = s.ID;
Comment

modify column name in tsql

sp_rename 'table_name.old_column', 'new_name', 'COLUMN';
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql text to decimal 
Sql :: open postgress in terminal mac 
Sql :: get size of indexes postgres 
Sql :: sql query to find duplicates in column 
Sql :: mssql current date 
Sql :: sql drop view if exists 
Sql :: sql alter table add column if exists 
Sql :: mysql check table exists 
Sql :: linux command line import mysql database 
Sql :: drop a row in mysql 
Sql :: oracle drop column 
Sql :: oracle current date without time 
Sql :: find last instance of character in string mysql 
Sql :: oracle compile schema 
Sql :: sqlserver add column to table 
Sql :: psql lst trigger 
Sql :: raw query must include primary key 
Sql :: oracle set sequence value to max(id) 
Sql :: sql missing records from another table 
Sql :: current setting postgres timezone 
Sql :: postgres remove foreign key constraint 
Sql :: tsql find foreign key references 
Sql :: pl sql dynamic sql drop doesnt work 
Sql :: get the mysql table columns data type mysql 
Sql :: laravel migration sql dump 
Sql :: day of week postgresql 
Sql :: get ddl materialized view oracle 
Sql :: user privileges postgresql information_schema 
Sql :: default password of mysql 
Sql :: sql select except null 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =