Update def query