I want to remove the last row from a table that satisfies some condition.
DELETE TOP 1 FROM SOME_TABLE WHERE SOME_COULMN = @VALUE ORDER BY 1 DESC
DELETE FROM SOME_TABLE WHERE UNIQUE_ID = (SELECT TOP 1 UNIQUE_ID FROM SOME_TABLE WHERE SOME_COLUMN = @VALUE ORDER BY SOMETHING DESC)
DELETE and UPDATE statements require parentheses () for the number of rows arguments
DELETE TOP (1) FROM SOME_TABLE WHERE SOME_COULMN = @VALUE ORDER BY 1 DESC
Source: https://habr.com/ru/post/1732520/More articles:Can I manually create an instance of the Core Data Entity class for temporary use? - iphoneIdentify a complex property in an ASP.NET user control - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1732517/google-app-engine-131-jars-in-publicly-available-maven-repository&usg=ALkJrhjtv9YWlTLr2g2ksNI3MYaqqMaUiAполучить текущий контроллер и действия на главной странице - c#How is data exchanged between two columns in SQL Server? - sqlCaching Django Models? How to disable testing - djangoIs there a lib to simplify html in C # /. NET / ASP.NET - htmlобновить визуальную студию до sp1 - visual-studioCreating a glitch in design verilog - designHow to get a value based on another value from an object / array in php - objectAll Articles