Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can i change the column name.

Answers were Sorted based on User's Feedback



How can i change the column name...

Answer / durgaprasad

sp_rename 'tablename.oldcolumnname','newcolumnname'

Is This Answer Correct ?    31 Yes 3 No

How can i change the column name...

Answer / kinthada cnu

hi all

sp_rename 'tablename.oldcolumnname','newcolumnname','column'

Is This Answer Correct ?    18 Yes 4 No

How can i change the column name...

Answer / ramesh5782

ALTER TABLE table_name
RENAME COLUMN old_name to new_name;

Is This Answer Correct ?    22 Yes 17 No

How can i change the column name...

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

How can i change the column name...

Answer / sanjay

ALTER TABLE tablename CHANGE oldname newname varchar (10) ;

Is This Answer Correct ?    3 Yes 0 No

How can i change the column name...

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

How can i change the column name...

Answer / naren

update tablename set newcolumn name where old column name

Is This Answer Correct ?    0 Yes 0 No

How can i change the column name...

Answer / dipti sonawane

alter table (table_name)
change (old_colomnname)(new_colomnname)

Is This Answer Correct ?    0 Yes 0 No

How can i change the column name...

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

How can i change the column name...

Answer / sonia

hi frnds, tell me one thing what is the difference b/w AS
keyword & sp_rename,AS is also used for reanme operation na.

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More SQL Server Interview Questions

What's new in sql management studio for sql server? : sql server management studio

0 Answers  


What do you know about normalization and de- normalization?

0 Answers  


When we are using this query to shrink the log file,what exactly it will execute internally? Do we lose any data when we run this script? which data it will truncate in the log file and where it is saved. Please let me know... USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<TransactionLogName>, 1) GO

1 Answers   Cognizant,


Explain the concepts and capabilities of sql server?

0 Answers  


Can I run multiple instances of sql server 2000 at the same time on one computer?

0 Answers  


Why I am getting this error when dropping a database in ms sql server?

0 Answers  


What is dataset and its uses

2 Answers  


What is executereader?

0 Answers  


How to find out name of all employees who has salary less than 200 Rs.?

8 Answers  


Can we have more than one NULL in a column having unique constraint?

12 Answers   247Customer,


How can I create a report based on a query? : sql server management studio

0 Answers  


What are the types of indexes?

0 Answers  


Categories