when creating MySQL sql scripts, is it necessary to use quote column name in
`column-name`
?
like:
DROP TABLE IF EXISTS `qs_admin_log`;
CREATE TABLE `qs_admin_log` (
`log_id` int(10) unsigned NOT NULL auto_increment,
`admin_name` varchar(20) NOT NULL,
`add_time` int(10) NOT NULL,
`log_value` varchar(255) NOT NULL,
`log_ip` varchar(20) NOT NULL,
`log_type` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`log_id`)
) TYPE=MyISAM ;
?
I saw many scripts use this , is it necessary or is it just a good practice to use?
But if I execute such sql statements in phpMyAdmin, it shows syntax error. Also when I convert MySQL database to MS SQL Server database, those becomes dot sign and MSSQL reports syntax error when executing.
So is it a good MySQL practice to use such quotes when writing SQL statements?