Top "Dynamic-sql" questions

Dynamic SQL is a technique using SQL (Structured Query Language) whose main difference from traditional SQL is that Dynamic SQL allows to build SQL statements dynamically at runtime, which eases the automatic generation and execution of program statements.

Permissions when using "Execute sp_Executesql"

I have a database where all access is controlled by stored procedures. The DBA would like to avoid giving users …

sql sql-server permissions dynamic-sql sp-executesql
Can I use MyBatis to generate Dynamic SQL without executing it?

I have some complex queries to build with a number of optional filters, for which MyBatis seems like an ideal …

java dynamic-sql mybatis
Why cannot I use bind variables in DDL/SCL statements in dynamic SQL?

I am trying to execute an SQL command within dynamic SQL with bind variables: -- this procedure is a part …

oracle plsql dynamic-sql execute-immediate
Dynamic SQL error converting nvarchar to int

I have created a procedure in dynamic SQL which has a select statement and the code looks like: ALTER PROCEDURE …

sql sql-server sql-server-2008 stored-procedures dynamic-sql
Dynamically generate columns in PostgreSQL

I have seen that there are quit a few similar questions like this one, but I havent understood how to …

postgresql plpgsql dynamic-sql postgresql-9.3 crosstab
Query the schema details of a table in PostgreSQL?

I need to know the column type in PostgreSQL (i.e. varchar(20)). I know that I could probably find this …

postgresql types dynamic-sql information-schema
How to cleanse dynamic SQL in SQL Server -- prevent SQL injection

We have a ton of SQL Server stored procedures which rely on dynamic SQL. The parameters to the stored procedure …

sql-server validation stored-procedures sql-injection dynamic-sql
Truncating all the tables in a schema in PostgreSQL

I am trying to truncate all the tables in a schema using PostgreSQL. It is showing this error: ERROR: relation "…

function postgresql plpgsql dynamic-sql
dynamic sql error: 'CREATE TRIGGER' must be the first statement in a query batch

As part of some administrative tasks, we have many tables that each need a trigger created. The trigger will set …

sql-server-2008 triggers dynamic-sql
Using enum parameters in myBatis dynamic SQL

How to do dynamic SQL in myBatis 3.1.1 based on an enum constant parameter?

string enums ibatis dynamic-sql mybatis