Classify types of advance query - SELECT, UPDATE or DELETE
647
Views
3
Comments
New
Aggregates & Queries

The idea is to add the possibility to classify the type of advanced query we need. This is very important because when we are using a SELECT query, we need to insert the output correctly. But when we only want to create an UPDATE query or a DELETE query, e.g. bulk update or bulk delete, the output structure is not important and by classify, for example, we don't need to insert an output chosen by us. 


Another example of a rule applied using this type, there is no need to insert a TOP in the DELETE or UPDATE queries and of course no Max. Records. 

And what would you do with a DELETE, UPDATE with an OUTPUT clause? 


For example:

DELETE FROM {ENTITY}

WHERE Id = @Id

OUTPUT deleted.*

Hi Matthias, 


In that case, one option could be to include an option if we want a structure as an output or not. But in my experience, most of the time we don't need that structure but is valid for your scenario and must be contemplated.


The only thing I would expect from DELETE, UPDATE actions would be the number of records affected in an output long integer. Nothing else.