Batched Statements

Batched statements allow you to set and execute SQL statements, optionally separated by semi-colons ( ; ), as one command. You can batch SET statements and CREATE VIEW statements optionally followed by a SELECT statement together, or just batch a Select statement.

Syntax

{ SET_Statement | CREATE_VIEW_Statement
[ [ ; ]  SET_Statement | CREATE_VIEW_Statement ]...
[ SELECT_Statement ] } | { SELECT_Statement }

Example


SET PROPERTYNAME 'D5CDD502-2E9C-101B-9397-08002B2CF9AE'
	PROPID 14 AS FooBar
	TYPE DBTYPE_STR

CREATE VIEW #FooView AS
	SELECT FileName, FooBar
		FROM SCOPE('"/CheckIn"')

SELECT * FROM #FooView

© 1997 by Microsoft Corporation. All rights reserved.