Answers for "sql dynamically"

0

sql dynamically

Use DataFlair;

-- Set the value of user-defined variables
SET @id = 'A01';

-- set the query you want to execute on the database
SET @query = 'SELECT * FROM DataFlair where emp_id = @id';

-- Prepare the statement to be run on the database
PREPARE stmt FROM @query;

-- Execute the prepared statement
Execute stmt;
Posted by: Guest on July-19-2021

Code answers related to "sql dynamically"

Browse Popular Code Answers by Language