>Can you tell me what is the alternative of CTS(Common table expression in SQL Server 2005) in MySQL
CTE (common table expressions) are often used instead of derived tables to improve readability. So, in MySQL you can use derived tables instead.
If you wanted to use recursive CTE, then it's not available in MySQL. However, recursive CTEs in SQL Server is a hidden 'cursor' in disguise, so you may be better using Numbers table approach if applicable.
See also
http://stackoverflow.com/questions/1382573/how-do-you-use-the-with-clause-in-mysql
If it's not broken, fix it until it is.
My Blog