VirtTipsAndTricksDeleteTriplesPatternsNotScopedNamedGraph How can I Delete Triple Patterns that are Not Scoped to a Named Graph? How can I Delete Triple Patterns that are Not Scoped to a Named Graph? Presuming this triple exists in one or more graphs in the store: { <http://kingsley.idehen.net/dataspace/person/kidehen#this> <http://xmlns.com/foaf/0.1/knows> <http://id.myopenlink.net/dataspace/person/KingsleyUyiIdehen#this> } The SQL query below will delete that triple from all graphs in the store: DELETE FROM DB.DBA.RDF_QUAD WHERE p = iri_to_id ('http://xmlns.com/foaf/0.1/knows') AND s = iri_to_id ('http://kingsley.idehen.net/dataspace/person/kidehen#this') AND o = iri_to_id ('http://id.myopenlink.net/dataspace/person/KingsleyUyiIdehen#this') ; According to SPARQL 1.1 Update, the FROM clause which scopes the query to a single graph is optional. Thus, the SQL query above can be rewritten to the SPARQL query below, again deleting the matching triple from all graphs in the store: DELETE { GRAPH ?g { <http://kingsley.idehen.net/dataspace/person/kidehen#this> <http://xmlns.com/foaf/0.1/knows> <http://id.myopenlink.net/dataspace/person/KingsleyUyiIdehen#this> } } WHERE { GRAPH ?g { <http://kingsley.idehen.net/dataspace/person/kidehen#this> <http://xmlns.com/foaf/0.1/knows> <http://id.myopenlink.net/dataspace/person/KingsleyUyiIdehen#this> } } Related Virtuoso Tips and Tricks Collection How can I delete triples from a graph? How can I delete triples from a "Large" graph? How can I copy triples from one graph to another? How can I move triples from one graph to another? How can I drop a graph? How can I delete graphs using stored procedure?