creating table inside stored procedure.

mysql India
  • 14 years ago

    hi,

    i am trying to create table inside the stored procedure with table name as parameter passed. but in my code table is getting created but with NAME same as parameter name  not as parameter value.. my code look like this:

    create procedure sp2(IN name varchar(5))
    begin
    create table $name (x int);
    end;
    //

    ----------
    Here i want table to be created with same name as parameter value. Can anybody suggest something on this. Its Urgent.

    thanks,
    nitin













Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Engineers are all basically high-functioning autistics who have no idea how normal people do stuff.” - Cory Doctorow