title: How to get Row count by dynamically passing the table name
body: <pre><code>create procedure qa_cc
  @tablename varchar(500)
  
  AS 
  
  BEGIN
      -- Create two integer values
  DECLARE @tableOneCount varchar(50), @tableTwoCount varchar(50)
  
  -- Get the number of rows from the first table
  SELECT @tableOneCount = 'SELECT COUNT(*) FROM'  + @tablename; 
      exec (@tableOneCount);           
  
  select      @tableOneCount  ; 
  
  END
  
  exec qa_cc @tablename=table1
  </code></pre>