How to Update a Column in MySQL

How to Update a Column in MySQL thumbnail
You need a basic understanding of SQL to update MySQL databases.

MySQL is the most widely used open source database for web applications. Content management systems such as Drupal and Wordpress often require MySQL in their installations. It is also the database preferred by PHP developers and is commonly bundled with PHP and Apache web server in installation packages. MySQL comes with a command-line application called MySQL Monitor which allows you to execute SQL statements to insert, update and delete rows within your database. For those using MySQL bundled with PHP and Apache, a web application called phpMyAdmin also provides a MySQL control panel with a graphical user interface.

Instructions

  1. Update Columns Using MySQL Monitor

    • 1

      Open MySQL monitor and log in with your username and password.

    • 2

      Select the database you wish to update. For example, to use the database named TARDIS, type in the following at the command prompt:

      use TARDIS;

    • 3

      Type in the SQL statement to update your column. To update the Date column of a table named "Destination" where the Location is equal to "Gallifrey" you can use the following SQL statement:

      UPDATE Destination

      SET Date='2011-11-11'

      WHERE Location='Gallifrey';

      If updating more than one column, for example "Date" and "Time," you can use the following statement:

      UPDATE Destination

      SET Date='2011-11-11', Time='11:11:11'

      WHERE Location='Gallifrey';

    • 4

      Press Enter to submit the changes.

    Update Columns Using phpMyAdmin

    • 5

      Open phpMyAdmin and log in.

    • 6

      Click the name of the database you wish to update columns for.

    • 7

      Find the table you'd like to change, and click on the "Browse" icon next to it.

    • 8

      Put a check mark on all the records that need to be updated and click on the pencil icon or the "Change" icon.

    • 9

      Edit the text on all the columns you wish to update and click on "Go."

Related Searches:

References

Resources

  • Photo Credit Jupiterimages/Photos.com/Getty Images

Comments

You May Also Like

  • How to Update Syntax for MySQL

    MySQL is a relational database that is optimized to hold data from a website. The "update" statement updates the columns of existing...

  • How to Update Multiple Columns

    Structured Query Language (SQL) is used to select, retrieve, add and delete data within a database (a collection of related tables). You...

  • How to Update & Increment MySQL

    MySQL (Structured Query Language) is a relational database management system that is utilized to manage information infrastructures and allow for multi-user access...

  • How to Update One Row in Microsoft SQL

    Microsoft SQL is a relational database, meaning each table within the database is related although it's a separate table. In addition, each...

  • How to Update a Table in MySQL

    A database helps to keep your information in order. The MySQL database management system helps you keep the hundreds or even thousands...

  • How to Update a Record in MySQL

    MySQL is an open-source database that is widely used in database-driven websites. In conjunction with programming languages such as PHP and ASP.net,...

  • How to Delete From MySQL

    MySQL, an open-source database, provides small and large companies with a database engine used for desktop and Web applications. The MySQL database...

  • How to Rename Columns in MySQL

    MySQL is a relational database server that stores information in database tables that you create, including column names and data types that...

  • How to Update Multiple Columns From Another Table

    SQL, or Structured Query Language, is a standard language many relational database management systems use to work with the data stored in...

  • How to Change the Column Name in MYSQL

    Sometimes a MySQL database designer does not know the appropriate column name for data until after he has designed and implemented a...

  • How to Return More Than One Row From Oracle SQL

    Oracle uses a language called "PL/SQL" to retrieve data from a database table. You can return more than one row using the...

  • How to Create Columns and Content in WordPress

    WordPress is a blogging platform and content management system that uses PHP and MySQL to display dynamic content for a blog or...

  • How to Copy a MySQL Database to a Website

    MySQL is relational database management software that can support multiple databases and users. First released in 1995, the software is among the...

  • How to Perform an UPDATE MySQL Query

    With a MySQL database, the UPDATE command is used to change some columns of a row already in the database. Usually, this...

  • How to Write SQL Scripts

    SQL, or Structured Query Language, which allows for the creation and editing of databases, is one of the easiest Web-based programming languages...

  • How to Check If Column Exists in MySQL

    Not all MySQL programs are created equal. Some have descriptive interfaces with more information that you need to see, while others are...

Related Ads

Featured