mySQL msSQL syntax

mySQL and msSQL has a similar SQL syntax but not the same. To have a grasp of what does this mean, let’s have an exercise to get 10 rows from a table with mySQL.

select * from [tablename] limit 10

Now if you were to run this sql query above on msSQL server you’ll either get a wrong sql query or query not able to compute. So alternative for msSQL is by entering this query instead.

select top 10 * from [tablename]

Simple?? Yes, that’s all there is to it. To those that need further questions answered, there are bound to be helpful people posting or me trying to help people out.

No Responses

  1. Pingback: Top 10 Results using SQL on DB2 | TechieDan January 19, 2011

Leave a Reply