Home > database >  Bosses help me have a look at what's the problem with this code! thank you
Bosses help me have a look at what's the problem with this code! thank you

Time:01-02

Delimiter//

Drop procedure if the exists Max//

CREATE PROCEDURE test ()

Declare st_date varchar (50);

The SET st_date=date_format (now (), '% Y % m % d).

SELECT @ SQL=CONCAT (` INSERT INTO test_ `, @ st_date, ` NAME `, ` zhang SAN `);

PREPARE p1 FROM @ SQL;

The EXECUTE p1.

DEALLOCATE PREPARE p1.

END

Is what I want to create a daily to a date on the surface of the table name insert data program doesn't know it right
  • Related