In MSSQL, I have a table having 2 columns, 1 is the id as primary key, whereas the other is just price and both are int.
The question is that I want the user to be informed if there is a loop in this table.
The loop can be such:
As seen, the id value having 1 has the loop in the third line with price value having 1. In such case, I want the user to be informed in C#.
How can I do that? I am a little illiterate regarding connecting the database and DML in MSSQL for C#.
Would be good with a code snippet.