I try to rename the table 'folks' to 'users'. How does it work?
Asked
Active
Viewed 235 times
-2
-
1Your question name does not match your description. – james_bond Dec 11 '16 at 14:01
-
Thanks for the hint, sorry. – Black Dec 12 '16 at 08:40
-
Poor try to get some rep with a simple question that has been asked back in the stoneage already. You have a gold badge and > 1k rep. You are experienced enough to know that this kind of duplicate question asking + self-answering is not how Stackoverflow works. – Daniel W. Dec 12 '16 at 09:07
-
@DanFromGermanylol, first of first, i was searching if the question exists, but nothing came up. Second it is even desired from SO to answer own questions Q&A style. Go ahead and create a new question and look what the text on the bottom says. "Answer your own question – share your knowledge, Q&A-style" – Black Dec 12 '16 at 09:31
2 Answers
0
If you want to rename the column and also change its type
ALTER TABLE [TableName] CHANGE [Column] [ColumnName] [New type];
For example:
ALTER TABLE folks CHANGE FolkAddress Address VARCHAR(1024);

james_bond
- 6,778
- 3
- 28
- 34
-
-
1I'm not, your problem description does not match the question name. – james_bond Dec 11 '16 at 15:12