Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: alero
  • Order by date
  1. alero

    using a paramater as table name

    At last I found the solution, I'll put it here so that no one will get stuck in this thing again... CREATE PROCEDURE getCount (IN tbl varchar(50)) BEGIN SELECT CONCAT(CONCAT(CONCAT("SELECT COUNT(*) AS ", tbl)," FROM "), tbl)INTO @query; PREPARE stmt FROM @query; EXECUTE stmt; DEALLOCATE PREPARE...
  2. alero

    using a paramater as table name

    hi. i'm writing a procedure that retrives row count of any table (in a specific dataase). table name should be supplied as a parameter to the procedure. i wrote: --++++++++++++++++++++++++++++++++++++++++++++++++++++++ DROP PROCEDURE IF EXISTS getCount; CREATE PROCEDURE getCount(IN tableName...

Part and Inventory Search

Back
Top