I'd have to agree with Alec here (over Erik's response).
There's no technical reason, surely, to use 'desc' instead of 'description' - 
people always seem afraid of using non-abbreviated fieldnames / function names 
/ variable names. Whilst it may add a little more to your typing, it adds so 
much to the making your system more understandable.
Code is immediately readable, the DB schema is more obvious, result: the whole 
system is improved.

/2 pennies' worth
--Rob


> DESC is a reserved word in MySQL: it is short for DESCENDING and is used 
to reverse the sort order in SELECTs. You an create a field with that name 
by enclosing it in backticks: `desc` whenever you need it. However, this 
would be regarded by many as very bad practice. It would be better to 
change the field name e.g. to "descr" or even "description". Making the 
field name longer and more meaningful costs next to nothing.

       Alec




Anthony <[EMAIL PROTECTED]> 
13/07/2006 16:42

To
mysql@lists.mysql.com
cc

Subject
Field name DESC






Hello,

i want to know how i can create a table with the feild name "desc" ?

when i do:


CREATE TABLE bank (
 name varchar(50) NOT NULL default '',
 desc varchar(50) NOT NULL default '',
)

the desc is badely interpreted...




-- 

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]




-- 

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


<

---------- Original Message ----------

FROM:      [EMAIL PROTECTED]
TO:        [EMAIL PROTECTED]
DATE:      Thu, 13 Jul 2006 17:01:10 +0100

SUBJECT:   Re: Field name DESC

DESC is a reserved word in MySQL: it is short for DESCENDING and is used 
to reverse the sort order in SELECTs. You an create a field with that name 
by enclosing it in backticks: `desc` whenever you need it. However, this 
would be regarded by many as very bad practice. It would be better to 
change the field name e.g. to "descr" or even "description". Making the 
field name longer and more meaningful costs next to nothing.

       Alec




Anthony <[EMAIL PROTECTED]> 
13/07/2006 16:42

To
mysql@lists.mysql.com
cc

Subject
Field name DESC






Hello,

i want to know how i can create a table with the feild name "desc" ?

when i do:


CREATE TABLE bank (
 name varchar(50) NOT NULL default '',
 desc varchar(50) NOT NULL default '',
)

the desc is badely interpreted...




-- 

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]




-- 

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to