How to pass a table as parameter to MySqlCommand?

Most databases won’t let you specify table or column names via parameters. Parameters are meant to be for values. If you really, really need this to be dynamic, you should validate the input (it should be a known table name, with known column names within that table) and then include that in the SQL.

Leave a Comment