Reputation: 15
How can I change my table entries name in XAMPP? My table name is 'products', the fields are name, item, price. Now, If i want to change the name of field 'item' to 'id'. So how can I change this?
Upvotes: 0
Views: 1901
Reputation: 879
Here is how you rename your table column name:
SQL:
EXEC SP_RENAME 'products.item', 'id', 'COLUMN'
MySQL(Please change data type to correct one):
ALTER TABLE products CHANGE item id INT
Hope this helps
Upvotes: 1