if somebody can help me please i want to write a store procedure in mysql to insert,update and delete but it should be dynamically because i have many tables and columns in my database the store procedure should be call than it should take the table and column dynamically ,can anyone help me please
thank you
god bless

Hello, first of all this is the MS SQL part of the forum, so you might get a better solution if you post in the MySQL.
Secondly I would like to warn you that quite often it can be very dangerous to use a stored procedure to delete from tables. Of course it depends on how you write the procedure, but it is easy to loose your data(ie if the criteria can be blank).
Now to the solution:
In MS SQL we use

execute(@sql)

to execute dynamic SQL. In MySQL I've searched (http://forums.mysql.com/read.php?98,152150,152174#msg-152174) and the equivalent seems to be

PREPARE stmt1 FROM 'SELECT "ok"';
		EXECUTE stmt1;
		DEALLOCATE PREPARE stmt1;

Give it a try and let us (or even better the MySQL team) know if you run into problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.