CREATE TABLE counties (
id int(11) NOT NULL auto_increment,
county tinytext NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
--
INSERT INTO `counties` VALUES (1, 'Alachua County');
I have seen some patterns here.
People uses “ to surround field names and use ” to surround values.
Is that true?
Or the major reason to do so is because then we can put the code in a text file and import into the database.
thank you
Yes, you use backticks [`] to surround field, table, and database names. You don’t really need it unless you are using spaces in your field/table names, or words that have special meaning in SQL (ie: from, where)
Single quotes
[']are use to surround strings.