• Home
  • Technology
    • Ebullientech
    • Entrepreneurship
    • Video Technology
    • Cloud Computing
    • Business Analysis
  • Thoughts
    • Food
    • General
    • Stories
    • Places
    • Workplace
    • Social Issues
    • Reviews
  • Quotes
  • Ebullientech News and Events
  • About

Kamalika's Notebook

thinking nothing...............!!

You are here: Home / Kamalika / Technology / MySQL / How to Rename a Column in MySQL

How to Rename a Column in MySQL

September 15, 2014 By Kamalika Leave a Comment

If you have already created your MySQL database and table and suddenly realize that one or more table columns need to be modified, you can either drop / delete / remove the respective column and create new or you can alter the table. Altering of the table can be done using any MySQL GUI Tool / Editor like MySQL Query Browser (for Windows) or Sequel Pro (for Mac OSX) or using a MySQL ALTER TABLE Query.

MySQL Query Browser

Right click on the table name in the right panel of MySQL Query Browser and click on Edit Table.

Edit Table MySQL Query Browser

In the Edit Table dialogue box slowly double click on table column name to modify, once the modifications are done click on Apply and Close.

rename a column in MySQL Query Browser

Sequel Pro

Select the table name from left panel and click on Structure in the right panel.

Edit MySQL table in Sequel Pro

Slowly double click on the column you want to modify, do the required modification and click somewhere outside the column area, changes will be saved.

Rename Table Column in Sequel Pro

MySQL ALTER Table Query

Syntax

[bash]

ALTER TABLE tablename CHANGE oldname newname BIGINT (20);

[/bash]

Example

[bash]

ALTER TABLE tbl_admin_modules CHANGE id id1 BIGINT (20);

[/bash]

The above query will rename the column id to id1 and change the column data type to BIGNT (20).

Click here for MySQL Manual for ALTER TABLE.

Filed Under: MySQL, Technology Tagged With: How to rename a column in MySQL, MySQL, MySQL ALTER TABLE

« SEO Tips for your WordPress Site or Blog
Fetch DAFAULT Value from MySQL Table »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

Let’s connect…

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Hello There…

I'm Kamalika, a techpreneur & startup mentor, blogger, hobbyist photographer, Netflix & Kindle indulgent, food connoisseur, Starbucks aficionado and former Disney employee ...next

Looking for something?

Tags

All in One SEO Pack AWS Banaras Blogger Blogging Blogs Creating Backup Schedule in RHEL 5 Dasaswamedh Ghat Ebullientech Ebullientech Interactive LLP Facebook Facebook Developers GeoTech GeoTech Informatics HipHop for PHP iPhone iPhone Apps Kamalika Guha Roy Kashi Ganga LAMP MindTwister MySQL Nabaneeta Guha Roy Online Marketing PayPal PayPal's suspension of Indian bank transactions Pentago PHP PHP & MySQL Saraswati Puja Search Engine Optimization SEO The Ganges TypePad UCO HUT UTV Indiagames Varanasi Web 2.0 Web 2.0 Design Web Design Web Marketing Website Design WordPress WordPress.COM WordPress.ORG

Timeline

  • 2020 (7)
  • 2019 (4)
  • 2018 (1)
  • 2015 (6)
  • 2014 (13)
  • 2013 (9)
  • 2010 (7)
  • 2009 (2)

Topics

Copyright © 2021 · Kamalika Guha Roy, Powered by Ebullientech Interactive LLP