Subscribe:

Pages

Showing posts with label MS SQL. Show all posts
Showing posts with label MS SQL. Show all posts

Tuesday, August 30, 2011

Write a Stored Procedure

This is basic thing, how to insert data using stored procedure. There are 4 fields I used in my User table (Id,UserName,Password,DateCreated).

SET NOCOUNT ON
:- not return a count value
@@Identity
:- return a value in primary key field which related with the newly inserted row
GETDATE() :- get the sql server time