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;