0

Does the syntax of an SQL software change from program to program? - (Like, in HeidiSQL you define a primary key in one way, in SQL server in other)

Or is it always the same? Because I'm getting syntax errors where my friend says I shouldn't because it worked for him when he was on this stuff, he didn't use heidi though.

Harlequin
  • 389
  • 1
  • 2
  • 9

2 Answers2

4

Yes, SQL syntax changes between different database providers. See this SO question for more detail: Difference between different types of SQL?

Community
  • 1
  • 1
Josh Gallagher
  • 5,211
  • 2
  • 33
  • 60
  • Thanks, if I may then, how do I know the correct syntax of a given provider? Is there a manual/list in the files? – Harlequin Feb 12 '14 at 18:31
  • 1
    Well, normally there is some kind of reference manual for a database provider. It looks like HeidiSql is capable of connecting to MySql and MS SQL Server, from my brief read of it. So the valid syntax might well depend on which type of database you are connecting to through it. For MS SQL you want to be looking at TransactSQL reference here: http://technet.microsoft.com/en-us/library/bb510741.aspx. For MySql, try here: http://dev.mysql.com/doc/ – Josh Gallagher Feb 12 '14 at 18:36
0

Each database contains differences for each provider you use. I search this site for specifics. Pick one and learn about it and there are really only small differences for each. Good luck finding what you need.

jshill103
  • 320
  • 1
  • 10