Search code examples
google-sheetsgoogle-query-language

Google Sheets Query language: can you use other SQL instructions like UPDATE, INSERT…?


I have a Google Sheet where I can select rows using its query language with its SQL-like queries: "SELECT A WHERE B > whatever", etc. I have now, however, a different column with a list of IDs, and I want to update all the rows that appear in that column. In SQL terms, I'm trying to do something like:

UPDATE sheet SET status='read' WHERE id IN (SELECT ID FROM newcolumn)

(I hope I'm making myself clear).

The question is: can you run instructions like UPDATE, DELETE, INSERT in Google's query language? If not, how can I do this?


Solution

  • It's not possible, please look at this reference: https://developers.google.com/chart/interactive/docs/querylanguage

    You could achieve this using scripts. Good start is learning range object.