mail4sha (10/9/2010)
In Oracle, we can set the public variable/constant/types/curosors in the Package specification, Could you please tell me that how to achieve the same functionality in the SQL server.
There is not such a thing as a package in SQL Server but you use DECLARE statement to declare variables, etc. Check here... http://msdn.microsoft.com/en-us/library/aa258839(SQL.80).aspx
Hope this helps.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.