Hi,
I'm trying to create a table where a column value is variable.
I've tried this, but does not work:
- string insertQuery = "CREATE table bbb.temptable AS SELECT null Id, TDId, TerritoryName FROM bbb.traveldocumentsterritories WHERE TDId=@TDId";
- MySql.Data.MySqlClient.MySqlCommand myCommand = new
- MySql.Data.MySqlClient.MySqlCommand(insertQuery, connection);
- check.Parameters.AddWithValue("@TDId", oldTDnumber);
- myCommand.ExecuteNonQuery();
TDID is the column name, and I want to pass the value with the variable OldTDnumber.
Any help would be appreciated!