/* Reto Egeter, fullparam.wordpress.com */ DECLARE @SearchStrTableName nvarchar(255), @SearchStrColumnName nvarchar(255), @SearchStrColumnValue nvarchar(255), @SearchStrInXML bit, @FullRowResult bit, @FullRowResultRows int SET @SearchStrColumnValue = ‘P042015003648’ /* use LIKE syntax P102004000005 P062005001955 P042011001733 P012009008972*/ SET @FullRowResult = 1 SET @FullRowResultRows = 20 SET @SearchStrTableName = NULL /* NULL for all tables, uses LIKE syntax */ SET @SearchStrColumnName = NULL […]
MYSQL search through whole database for a certain string.
The code above will generate a procedure called get_table(SEARCH_STRING) , that will accept 1 parameter which is your string. It will search through the whole database server besides these db(information_schema,test,mysql). But if you would like to search only in a certain DB you may use the second block. $ call get_table(‘STRING’); ## FIRST BLOCK ## […]