delete
Deletes statements from a model. Specify the statements either explicitly or by using a select
command. The corresponding command for inserting statements is insert
.
To remove a single statement, specify its subject, predicate and object after the delete
command. For example:
delete <ns:subject> <ns:predicate> 'object' from <rmi://mysite.com/server1#model1>;
To remove a group of statements, include a select
command after the delete
command. The query must select exactly three columns, corresponding to the subject, predicate and object (in that order) of the statements to be removed.
The following example selects all the statements in #model1
and uses the result within a delete
command to remove all the statements found in #model1
from another model, #model2
.
delete select $s $p $o from <rmi://mysite.com/server1#model1>
where $s $p $o from <rmi://mysite.com/server1#model2>;
Note - The select query must return valid RDF statements. That is, the subject and predicate must be resources, not literals.