0

I just signed in to MySQL and am trying to connect to a database so that I can begin to write tables. My research understanding is that you use "use" followed by the database name, and end with ;

The database name that I am trying to connect to is 3 words with space in between them (i.e., A B Database)

When I try use A B Database; it says there is a syntax error at the B. Any reasons why this may be happening?

1 Answers1

0

Surround the database name with back-ticks: e.g.

create database `abc de f`;
use `abc de f`;

The back-tick character is used to surround database, table or field names that contains a space.

Don Dickinson
  • 6,200
  • 3
  • 35
  • 30