Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Why does this CREATE Table statement not work?

Here's my CREATE TABLE statement:

CREATE TABLE 'volte7' ('Num Days' varchar(20)DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1

I keep getting an error that says something is wrong with my syntax and I can't figure out what it is.

What's wrong?
0
brucegust
Asked:
brucegust
2 Solutions
 
Steve WalesSenior Database AdministratorCommented:
Two things immediately come to mind.

* Space between varchar(20) and DEFAULT
* I believe that the 'quotes' around object names in MySQL is the back quote (usually the key to the left of 1 on US keyboards), not a regular quote - so ` not '
0
 
GaryCommented:
CREATE TABLE volte7 (`Num Days` varchar(20) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1

Open in new window

0
 
brucegustAuthor Commented:
Excellent
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now