How to delete multiple rows in SQL Server -


I have four tables with secondhand sales car databases and relationships are related to the same column names.

Tables are:
records : RecID mark name model ...
attributes : FeatureID feature name
Marks : MarkId MarkName
Carrefour : Carried IDID Recored Feature ID

Now, I want to delete a mark from C # in Marx. When I delete an icon, SQL destroys all records, those who have this mark.

I have used a query like this:

  Remove from Carfeature where RecID = record where mark = (MarkID = @ MarkID marks, choose the mark name ) "; String sorgudelmarkfromrecord =" Remove from the record where Mark = (Markmark = Mark mark by mark mark); "; String with sorgudelmark =" marks where markId = @marchid ";  

When I run it, I get an error message like this:

Subquery Back More than 1 value.

subquery here =,! =, & Lt;, & lt; = , <<> Code> or subquery is used as an expression.

The statement has been aborted.

So, how can I delete many data from a table?

If I If you think right, then to remove all car features for the market from this query:

  Remove from carfire where from record (record Select the Records, where Mark name IN (Mark mark from Marks, MarkID = @ MarkID))  

Deleting records and marks is a simple version of this query, I will leave.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -