How to Use Reserved Names As Columns in MySQL

MySQL has a list of reserved words used to create functions and stored procedures in your database. You use the tick mark key to use these reserved words as a database column name. These tick marks tell the database that the word you used is a table or column name, and should not be used as part of the actionable query commands.

Instructions

    • 1

      Open the Query Browser program on your desktop from the Windows program menu. Log into your database when the login window opens.

    • 2

      Right-click the stored procedure you want to edit and select "Alter Procedure." The MySQL editor opens containing your procedure code.

    • 3

      Locate the reserved word and encompass the word with the tick mark. The following code is an example of creating a procedure that queries the "order" table, which is a reserved MySQL word:

      select * from `order`

    • 4

      Click the "Execute" button to alter the procedure and run the query to select values with the reserved keyword.

Related Searches:

References

Comments

Related Ads

Featured