-3

#here is my query

CREATE TABLE IF NOT EXISTS 'details' (
'id' int(11) NOT NULL AUTO_INCREMENT,
'name' varchar(200) NOT NULL,
'email' varchar(200) NOT NULL,
'gender' varchar(200) NOT NULL,
'address' longtext NOT NULL,
'username' varchar(30) NOT NULL,
'password' varchar(30) NOT NULL,
'verify' tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY ('id')
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
Akina
  • 39,301
  • 5
  • 14
  • 25
Manoj M
  • 3
  • 3
  • 1
    Study carefully the quote chars usage - what char for what purposes must be used. – Akina Sep 08 '22 at 07:55
  • can you tell me where can I possible study and what was my mistake so that I learn and grow , that would be much helpful thank you – Manoj M Sep 08 '22 at 07:57
  • [Literal Values](https://dev.mysql.com/doc/refman/8.0/en/literals.html), [Schema Object Names](https://dev.mysql.com/doc/refman/8.0/en/identifiers.html) – Akina Sep 08 '22 at 07:59
  • Try "sql tutorial" in google and - yes - w3schools is very much acceptable for beginners (against to contrary believe in this community) – IT goldman Sep 08 '22 at 08:06
  • On [MySQL Tutorial](https://www.mysqltutorial.org/) you can find very useful tutorials – Ergest Basha Sep 08 '22 at 08:34

1 Answers1

-1

Replace names of columns with back ticks.

String use normal single quotes chars.

So:

CREATE TABLE IF NOT EXISTS `details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`email` varchar(200) NOT NULL,
`gender` varchar(200) NOT NULL,
`address` longtext NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`verify` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
IT goldman
  • 14,885
  • 2
  • 14
  • 28
  • None of object name needs in quoting - so backticks are excess and can be removed at all in this case. – Akina Sep 08 '22 at 08:00