title: Can I use MS SQL syntax in Sybase?
body: <p>I have worked on SQL Server database. Now I have to work on a Sybase database (using a Squirrel client). This query is not working : </p>
  
  <pre><code>DECLARE @tableName VARCHAR(500);
  DECLARE my_cursor CURSOR FOR
  
  SELECT name
  FROM   sysobjects
  WHERE  type = 'U';
  OPEN my_cursor;
  FETCH NEXT FROM my_cursor INTO @tableName;
  WHILE @@FETCH_STATUS = 0
      BEGIN
          //Do something here
          FETCH NEXT FROM my_cursor;
      END
  CLOSE my_cursor;
  DEALLOCATE CURSOR my_cursor; 
  </code></pre>
  
  <p>It gives an error - <code>Incorrect syntax near the keyword 'FROM'. 
  SQLState:  ZZZZZ
  ErrorCode: 156
  Error occured in:
  FETCH NEXT FROM my_cursor INTO @table_Name</code></p>
  
  <p>Now this works fine in a SQL Server database (after I change the last line to <code>DEALLOCATE my_cursor</code>). Can anybody tell me where I am going wrong?</p>