Saturday, 20 September 2014

Stored Procedure to Get all table names from database


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE Procedure [dbo].[proc_GetAllTables]      
        
AS   
       
BEGIN   
   
 Begin Try   

  SELECT name FROM sys.Tables
       
 End Try   
   
 BEGIN CATCH   
   
     return  '0';   
   
 END CATCH   
   
END

No comments:

Post a Comment