-1

我想在 MySQL 中编写一个搜索我们编写示例的 UserId 的过程

call NEW_PROCEDURE(2) 

where 2 = UserId我们希望在所有表中搜索。我有一个想法,但我不知道怎么做。首先,我们必须搜索数据库中的所有列 wherecolumn_name = UserId和 其次,我们必须搜索我们在过程中调用的值,并且UserId = our value

有人可以帮助我吗?

4

1 回答 1

0

这会给你一个想法http://beyondrelational.com/modules/2/blogs/70/posts/10883/search-a-value-in-character-column-of-all-tables.aspx

1 Use concat instead of +
2 Use prepared statement to exeucte the query
3 Information_schema is supported in mysql too
于 2012-07-27T08:43:15.237 回答