title: Implementing a stack (LIFO) in SQL Server using stored procs/functions
body: <p>I am looking at writing a stack (LIFO) implementation in SQL Server. I would like to have a function that pushes a string onto the stack, a function that would pop the string off the stack and a function that gets the current value on the stack. So far am looking at using IDENTITY to keep track of stacks but does anyone have a better implementation or some hints on how to implement this in sql server?</p>