"Created Data Time And Collation Name" Of Table And Stored Procedure In SQL Server

Introduction

By executing a SQL query, we can get detailed information about what date and time the table and stored procedure were created. Sp_help is a system stored procedure.This procedure is extremely useful in the database because almost any object can be passed as a parameter in order to return back the detailed information about that object.

Decription

Instead of using right click and filtering the table name and stored procedure name using SQL Server Object Explorer to get information about table and stored procedure, we can write SQL query and check.

What is Collation?

collation_name is the name of the collation to be applied to the expression, column definition, or database definition.

Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity.
 
Steps

Create one table. 
  1. CREATE TABLE [dbo].[TblSatya](  
  2.     [ID] [intNULL,  
  3.     [NAME] [nvarchar](50) NULL  
  4. ON [PRIMARY]  
  5. GO 
To get the detailed biodata of table, execute the below SQL query.
  1. sp_help 'tblSatya' 
Created data time & Collation name of table .
 
 
Create one stored procedure and assign some paramaeter.
  1. Create procedure Sp_Satya  
  2. @ID int,  
  3. @NAME varchar(200)  
  4. As  
  5.  Begin  
  6.   select * from tblSatya where ID = @ID  
  7.  End 
To get the detailed biodata of stored procedure, execute the below SQL query.
  1. sp_help 'Sp_Satya' 
Created data time & Collation name of stored procedure.

That's it.
 
This is how we can get the date and time of creation of a table and a stored procedure.