Share via


2.1.2.9 B031, Basic dynamic SQL

V0045:

The specification states the following:

 Subclause 5.4, "Names and identifiers":
  
 <SQL statement name> ::=
 <statement name>
 | <extended statement name>
  
  
 ...
  
 <dynamic cursor name> ::=
 <cursor name>
 | <extended cursor name>
  
 ...
  
 <descriptor name> ::=
 <non-extended descriptor name>
 | <extended descriptor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <SQL statement name>.
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain <dynamic cursor name>.
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <descriptor name>.
  
 Subclause 6.4, "<value specification> and <target specification>":
  
 <general value specification> ::=
 <host parameter specification>
 | <SQL parameter reference>
 | <dynamic parameter specification>
 | <embedded variable specification>
 | <current collation specification>
 | CURRENT_CATALOG
 | CURRENT_DEFAULT_TRANSFORM_GROUP
 | CURRENT_PATH
 | CURRENT_ROLE
 | CURRENT_SCHEMA
 | CURRENT_TRANSFORM_GROUP_FOR_TYPE <path-resolved user-defined type name>
 | CURRENT_USER
 | SESSION_USER
 | SYSTEM_USER
 | USER
 | VALUE
  
 ...
  
 <dynamic parameter specification> ::=
 <question mark>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <general value specification> that contains a <dynamic parameter specification>.
  
 Subclause 20.2, "<allocate descriptor statement>":
  
 <allocate descriptor statement> ::=
 ALLOCATE [ SQL ] DESCRIPTOR <descriptor name> [ WITH MAX <occurrences> ]
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <allocate descriptor statement>.
  
 Subclause 20.3, "<deallocate descriptor statement>":
  
 <deallocate descriptor statement> ::=
 DEALLOCATE [ SQL ] DESCRIPTOR <descriptor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <deallocate descriptor statement>.
  
 Subclause 20.4, "<get descriptor statement>":
  
 <get descriptor statement> ::=
 GET [ SQL ] DESCRIPTOR <descriptor name> <get descriptor information>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <get descriptor statement>.
  
 Subclause 20.5, "<set descriptor statement>":
  
 <set descriptor statement> ::=
 SET [ SQL ] DESCRIPTOR <descriptor name> <set descriptor information>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <set descriptor statement>.
  
 Subclause 20.6, "<prepare statement>":
  
 <prepare statement> ::=
 PREPARE <SQL statement name> [ <attributes specification> ]
 FROM <SQL statement variable>
  
 <attributes specification> ::=
 ATTRIBUTES <attributes variable>
  
 <attributes variable> ::=
 <simple value specification>
  
 <SQL statement variable> ::=
 <simple value specification>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <prepare statement>.
  
 Subclause 20.9, "<describe statement>":
  
 <describe output statement> ::=
 DESCRIBE [ OUTPUT ] <described object> <using descriptor> [ <nesting option> ]
  
 <nesting option> ::=
 WITH NESTING
 | WITHOUT NESTING
  
 <using descriptor> ::=
 USING [ SQL ] DESCRIPTOR <descriptor name>
  
 <described object> ::=
 <SQL statement name>
 | CURSOR <extended cursor name> STRUCTURE
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <describe output statement>.
  
 Subclause 20.10, "<input using clause>":
  
 <input using clause> ::=
 <using arguments>
 | <using input descriptor>
  
 <using arguments> ::=
 USING <using argument> [ { <comma> <using argument> }... ]
  
 <using argument> ::=
 <general value specification>
  
 <using input descriptor> ::=
 <using descriptor>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <input using clause>.
  
 Subclause 20.11, "<output using clause>":
  
 <output using clause> ::=
 <into arguments>
 | <into descriptor>
  
 <into arguments> ::=
 INTO <into argument> [ { <comma> <into argument> }... ]
  
 <into argument> ::=
 <target specification>
  
 <into descriptor> ::=
 INTO [ SQL ] DESCRIPTOR <descriptor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <output using clause>.
  
 Subclause 20.12, "<execute statement>":
  
 <execute statement> ::=
 EXECUTE <SQL statement name> [ <result using clause> ] [ <parameter using clause> ]
  
 <result using clause> ::=
 <output using clause>
  
 <parameter using clause> ::=
 <input using clause>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <execute statement>.
  
 Subclause 20.13, "<execute immediate statement>":
  
 <execute immediate statement> ::=
 EXECUTE IMMEDIATE <SQL statement variable>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain an <execute immediate statement>.
  
 Subclause 20.14, "<dynamic declare cursor>":
  
 <dynamic declare cursor> ::=
 DECLARE <cursor name>
 <cursor properties>
 FOR <statement name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic declare cursor>.
  
 Subclause 20.17, "<dynamic open statement>":
  
 <dynamic open statement> ::=
 OPEN <dynamic cursor name> [ <input using clause> ]
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic open statement>.
  
 Subclause 20.18, "<dynamic fetch statement>":
  
 <dynamic fetch statement> ::=
 FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name> <output using clause>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic fetch statement>.
  
 Subclause 20.19, "<dynamic single row select statement>":
  
 <dynamic single row select statement> ::=
 <query specification>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic single row select statement>.
  
 Subclause 20.20, "<dynamic close statement>":
  
 <dynamic close statement> ::=
 CLOSE <dynamic cursor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic close statement>.
  
 Subclause 20.21, "<dynamic delete statement: positioned>":
  
 <dynamic delete statement: positioned> ::=
 DELETE FROM <target table> WHERE CURRENT OF <dynamic cursor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic delete statement: positioned>.
  
 Subclause 20.22, "<dynamic update statement: positioned>":
  
 <dynamic update statement: positioned> ::=
 UPDATE <target table> SET <set clause list>
 WHERE CURRENT OF <dynamic cursor name>
  
 ...
  
 Conformance Rules
  
 Without Feature B031, "Basic dynamic SQL", conforming SQL language shall not contain a <dynamic update statement: positioned>.

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

Transact-SQL does not support this feature. See the EXECUTE, EXEC [MSDN-EXECUTE], and sp_executesql [MSDN-spexecutesql] statements for equivalent functionality.