SPARQL Update example for updating more than one triple in a single query

前端 未结 4 1009
隐瞒了意图╮
隐瞒了意图╮ 2021-01-02 18:11

Can anyone point me to a valid UPDATE statement in SPARQL in any documentation (be it W3C, virtuoso, semantic web page, or your own custom code, etc?

It has

4条回答
  •  忘掉有多难
    2021-01-02 18:56

    In SPARQL updates are represented as a DELETE followed by an INSERT:

    http://www.w3.org/TR/2010/WD-sparql11-update-20100126/#t413

    PREFIX foaf:  
    
    WITH 
    DELETE { ?person foaf:firstName 'Bill' }
    INSERT { ?person foaf:firstName 'William' }
    WHERE
      { ?person a foaf:Person .
        ?person foaf:firstName 'Bill'
      }
    

提交回复
热议问题