In T-SQL the WITH statement is used to create CTEs (Common Table Expressions) allowing you to access a temporary named resultset.

I believe the WITH statement is only available on SQL Server 2005+.

MSDN article on CTEs: WITH common_table_expression (Transact-SQL)

Another MSDN article: Using Common Table Expressions