Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How to maintain serial number for duplicate id in a table
Amol Jadhao
Sep 16 2015 12:51 PM
484
Reply
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?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Find Column Name according to values
Printing Column in SQL