Share via


2.1.2.258 T652, SQL-dynamic statements in SQL routines

V0294:

The specification states the following:

 Subclause 4.34.2.9, "SQL-dynamic statements":
  
 The following are the SQL-dynamic statements:
 — <execute immediate statement>.
 — <allocate descriptor statement>.
 — <deallocate descriptor statement>.
 — <get descriptor statement>.
 — <set descriptor statement>.
 — <prepare statement>.
 — <deallocate prepared statement>.
 — <describe input statement>.
 — <describe output statement>.
 — <execute statement>.
  
 Subclause 11.60, "<SQL-invoked routine>":
  
 <SQL routine body> ::=
 <SQL procedure statement>
  
 ...
  
 Conformance Rules
  
 Without Feature T652, "SQL-dynamic statements in SQL routines", conforming SQL language shall not contain an <SQL routine body> that contains an SQL-dynamic statement.
  
 Subclause 13.4, "<SQL procedure statement>":
  
 <SQL procedure statement> ::=
 <SQL executable statement>
  
 <SQL executable statement> ::=
 <SQL schema statement>
 | <SQL data statement>
 | <SQL control statement>
 | <SQL transaction statement>
 | <SQL connection statement>
 | <SQL session statement>
 | <SQL diagnostics statement>
 | <SQL dynamic statement>

Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 vary as follows:

Transact-SQL partially supports this feature. Transact-SQL supports the EXECUTE and EXECUTE IMMEDIATE statements.