Thursday, 15 March 2018

Write query to generate serial number in single query?

Write query to generate serial number in single query?


SET @rownum:=0;      // Variable Declearation

SELECT @rownum:=@rownum+1 AS id, <colName1>,<colName2> FROM <TableName>;

No comments:

Post a Comment