Educational Materials like Computer, engineering, software and Property , Entertainment: Auto Increment of column which is varchar type in sql
Custom Search

Subscribe Now: Feed Icon

Addthis Sharing Gadget

January 17, 2012

Auto Increment of column which is varchar type in sql

Axapta Code solutions   Earn Money its Real


Set Auto Increment of column which is varchar type in sql

If you want to Set Auto Increment of column which is varchar type in sql table then you can do that by using following way

CREATE TABLE StudentTable
(
Regid int IDENTITY(1,1) NOT NULL
, StudentCol nvarchar(3) DEFAULT 'STD'
, StudentId AS (StudentCol+ REPLICATE('0', 10-LEN(CONVERT(nvarchar(100),Regid ))
,OtherColumnsYouNeed nvarchar(MAX)
)

0 comments:

Post a Comment

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com Free Search Engine SubmissionLink Building Service