Sql Server CE can I delete TOP or only 1 record from table that matches my query
问题 select Top(1)* from TableName Where columnName=value selects only the first row just fine. However if I change the select to a delete I get an error and can't figure out how to write a query to delete only 1 record that matches my query from the db. I'm wondering if anybody out there smarter than I knows if or how this can be done in SQL CE. 回答1: Did you try something like this? DELETE TableName where IdColumn In ( select Top(1) IdColumn from TableName Where columnName=valuev) 回答2: I don't