0

Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'if'

Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'then'

Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'delete'

Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'varchar'

Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'restrict'

I can't seem to generate a complete and correct Database with this only 5 of the tables are generated.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sona Legends
  • 27
  • 1
  • 7

1 Answers1

0

First of all, your generated syntax seems to be for SQL Server.

The correct MySQL syntax for dropping a foreignkey is:

alter table ARTICLE drop foreign key FK_ARTICLE_CONTENIR_ACHAT

And take note that the foreign key constraint has to be dropped by constraint name.

Simon C
  • 316
  • 2
  • 5