Skip to main content
Inspiring
August 14, 2008
Answered

insert, update, delete

  • August 14, 2008
  • 4 replies
  • 915 views
If I have a cfquery with the relevant datasource and name etc. then will the sql be the same for:

1. insert, update, delete with mysql and mssql?
2. Are unions and joins different for mysql and mssql?

Thank you!
This topic has been closed for replies.
Correct answer Dan_Bracuk
Whenever you compare two db's it's reasonable to assume that they will behave identically if you stick to plain vanilla sql and that there will at least one difference when it comes to functions.

4 replies

Inspiring
August 16, 2008
OK thanks I saw a cheat sheet from pete freitag for mssql so I'll have a look at that. Thanks Dan
Dan_BracukCorrect answer
Inspiring
August 15, 2008
Whenever you compare two db's it's reasonable to assume that they will behave identically if you stick to plain vanilla sql and that there will at least one difference when it comes to functions.
Inspiring
August 14, 2008
Hydrowizard wrote:
> If I have a cfquery with the relevant datasource and name etc. then will the sql be the same for:
> 1. insert, update, delete with mysql and mssql?
> 2. Are unions and joins different for mysql and mssql?

Always? No. There are similarities in syntax, but there are also differences. IIRC, an example is INSERT. I do not believe MS SQL allows this structure, whereas MySQL does.

INSERT INTO Table (..Columns..) VALUES (..set one...), (..set two...), (...set three..)

For more specific details about syntax differences you will need to do some searching. Also check migration documents for MySQL or MS SQL. They usually provide a good summary of differences between the two database types.
Inspiring
August 14, 2008
What happened when you tried it?
Inspiring
August 15, 2008
I did try it Dan I don't have mssql

Thanks cfsearchin I'll have a look for those docs.