Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Rename Table Sql8

Hi experts, I'm trying to rename one of my tables but the solution below didn't work. When I execute it an error meassage says; "Incorrect syntax near the keyword 'TABLE'." I'm using Sql 8. Any help please!


RENAME TABLE Personnel TO newPersonnel
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

TO rename a table name please use below command-

EXEC SP_RENAME 'schema.oldtablename', 'newtablename'
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Thank you so much Pawan, It's working. I also thank you Kevin for the important reminders . More power to you both and God bless!
Glad we could help.  Take care!  Nice job, Pawan!