All Questions
4 questions
4
votes
5
answers
5k
views
How to update table records in reverse order?
I've a table Student
Id Name Mark
1 Medi 10
2 Ibra 15
3 Simo 20
and I want to update it, where I want to reverse it in descending order only Name and Mark and keep Id in its order:
...
1
vote
1
answer
4k
views
Can I retry every SQL query in case of a deadlock exception (MSSQL)
Is it always safe to retry an SQL query in case of a deadlock exception? Can this lead to unexpected behavior or executing an operation twice? I think a deadlock exception always means a rollback even ...
0
votes
1
answer
681
views
Subtract multiple quantities in table2 from table1
How can I subtract the quantities in table2 from table1?
I'm using SQL Server 2014.
Table1
P_ID name quantity
1 carrot 100
2 eggplant 100
3 Avocado 100
4 ...
5
votes
2
answers
292
views
Query Plan question
I've created a varbinary hash to check changes between 2 tables.
Here is the execution plan, I'm a bit stumped on the indexing, or indeed if there is a better way of writing this.
https://www....