Search code examples
mysqlsqlcreate-table

SQL CREATE statement troubleshooting


I'm using WAMPServer to make a database on localhost. I've changed the language settings to english but I keep getting errors in French. For example, submitting this statement:

CREATE TABLE table A
(
  A TIMESTAMP(1) PRIMARY,
  B TIMESTAMP(1),
  C VARCHAR(100),
  D VARCHAR(25)
)

results in this error:

MySQL said: Documentation

#1064 - Erreur de syntaxe près de 'A
(
  A TIMESTAMP(1),
  B TIMESTAMP(1),
  C ' Ã  la ligne 1 

Can somebody help me out please?

Thanks


Solution

  • Did you set this in your session before entering the sql command?

    SET lc_messages = 'en_US';
    

    If you exit the session, then the settings revert to what the database daemon has in its configuration files.. You may have a setting or a shell script alias in your environment that has the error message variable set to French.