Jump to content

Why shouldn't I use `?


Garethp

Recommended Posts

Okay, so I've gotten into the habbit of using ` for all table and column names because I'm not sure what is and is not reserved. But I've recently been told this should be avoided unless I'm using a reserved name. Why is this?

Link to comment
Share on other sites

An RDBMS is a 'relational database management system'

 

MySql is an RDBMS.

 

SQL is a language used to query data contained within a RDBMS.

 

Different RDBMS's use different dialects of SQL, `backticks` are a feature that is specific to MySQL only.

Link to comment
Share on other sites

I'm not sure what is and is not reserved

There's a table in the documentation and when you do use them as table/column names, your query fails to execute and produces an SQL syntax error (see the mysql_error() function for debugging) where the part of the query that is printed in the error message, starts with the reserved keyword that was found in a context where it does not belong - http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.