S
S
SomethingSpecial2018-09-24 11:47:31
SQL Server
SomethingSpecial, 2018-09-24 11:47:31

Is it possible to reset the counter when adding a new record in MS SQL?

There are two tables. In one autoincrement file id , in the other autoincrement page id. The tables are linked by a key by the file id. DB schema 5ba8a3b5c5d1a112379620.jpeg
As a result, I want to make sure that when the file id changes, the page id is reset to zero. For simplicity and clarity, I will attach an example5ba8a4956acd8219009456.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2018-09-24
@SomethingSpecial

Write a trigger for change in it, analyze the changes and take the necessary actions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question