TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Amol Jadhao
NA
585
310.5k
How to maintain serial number for duplicate id in a table
Sep 16 2015 12:51 PM
lets consider i have a table like this
create table #temp
(
Id int primary key identity(1,1),
amount decimal(10,0),
inserted_date datetime,
empId int,
series_no int
)
when i will insert record with empId 1000 ,then i want to insert serial no 1,2,3 for that employee id.
again if employee id 1001 then serial number start with 1,2,3 so on..
how could i achieve this any suggestion?
Reply
Answers (
3
)
Find Column Name according to values
Printing Column in SQL