How can i change the column name.
Answers were Sorted based on User's Feedback
Answer / durgaprasad
sp_rename 'tablename.oldcolumnname','newcolumnname'
| Is This Answer Correct ? | 31 Yes | 3 No |
Answer / kinthada cnu
hi all
sp_rename 'tablename.oldcolumnname','newcolumnname','column'
| Is This Answer Correct ? | 18 Yes | 4 No |
Answer / ramesh5782
ALTER TABLE table_name
RENAME COLUMN old_name to new_name;
| Is This Answer Correct ? | 22 Yes | 17 No |
Answer / harsh v m
Sonia, clear your doubt here.
AS keyword is used for aliasing some existing column name
for our convenience.But the column name doesn't change @
database.
But incase of renaming a column the change is reflected @
database n it's usually done if we wish changing property
of a particular column.
sp_rename 'tablename.oldcolumnname','newcolumnname'->This
actually works out for Sql 2000.ALTER TABLE key doesn't
help.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / y.narendra kumar
This example renames the contact title column in the
customers table to title.
EXEC sp_rename 'customers.[contact
title]', 'title', 'COLUMN'
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / naren
update tablename set newcolumn name where old column name
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / dipti sonawane
alter table (table_name)
change (old_colomnname)(new_colomnname)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / om
the alter command is used to do modification at column level . so in order to change the name of a column we need to use alter .
command:- alter table (table name) rename (old column name) to (new column name)
note :- dont put brackets its just for u to understand
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between cube operator and rollup operator? : SQL Server Architecture
What are different types of table joins?
How are the unique and primary key constraints different?
4 Please write a querry to find repeated numbers in the following table. Table Name: Table1 Field1 10 15 20 15 10
What is the stuff and how does it differ from the replace function?
Where in ms sql server is ’100’ equal to ‘0’?
What are the disadvantages of using the stored procedures?
What is an active database?
How to change server name in sql server?
What is Dedicated Administrator Connection in sql server 2005?
Explain the difference between control flow and data flow?
how to get 25th row in any table in sqlserver can u tell me syntax
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)