Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Posts
    85

    Unanswered: MySQL to SQL Server - query migration

    Hi,

    I would liked to know the SQL Server equivalent for the below MySQL query :

    SELECT
    a.col1,
    a.col2,
    max(a.col1)
    FROM test a,
    test1 b
    WHERE a.col2 = b.col2
    GROUP BY a.col1

    Thanks,
    MiraJ

  2. #2
    Join Date
    Jun 2003
    Posts
    269
    SELECT
    a.col1,
    a.col2,
    max(a.col1)
    FROM test a,
    test1 b
    WHERE a.col2 = b.col2
    GROUP BY a.col1,a.col2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •