Peter Brodersen <usenet@ter.dk> wrote:
>>>>Jeg er ikke så stærk i SQL så bær over med mig hvis jeg spørger dumt.
>>>Hvilken SQL-server taler vi om her?
>>MSSQL2k
>
>Så bliver jeg nok et svar skyldig. Jeg tror, det er en MySQL-specifik
>feature (om ikke andet en specifik syntaks), på den måde at kunne
>slette fra flere tabeller.
Er du sikker?
Det ligner den samme syntaks i MSSQL.
Deleting Rows with DELETE
The DELETE statement removes one or more rows in a table or view. A
simplified form of the DELETE syntax is:
DELETE table_or_view FROM table_sources WHERE search_condition
table_or_view names a table or view from which the rows are to be
deleted. All rows in table_or_view that meet the qualifications of the
WHERE search condition are deleted. If a WHERE clause is not
specified, all the rows in table_or_view are deleted. The FROM clause
specifies additional tables or views and join conditions that can be
used by the predicates in the WHERE clause search condition to qualify
the rows to be deleted from table_or_view. Rows are not deleted from
the tables named in the FROM clause, only from the table named in
table_or_view.
Any table that has all rows removed remains in the database. The
DELETE statement deletes only rows from the table; the table must be
removed from the database by using the DROP TABLE statement.
Tak for hjælpen til dig og Kristian.
--
Lars Kim Lund
http://www.net-faq.dk/