Home > Back-end >  Missing equal sign on simple update statement using oracle
Missing equal sign on simple update statement using oracle

Time:10-02

I'm using apex oracle and running into missing equal sign error on this simple update statement. Can someone please point out what's wrong with this query?

update product_t set qty-onhand = 11000 where productid = 28

CodePudding user response:

qty-onhand is column qty minus column onhand.

You need to 'escape' the column name (or just use a better column name, without a minus sign in it).

update product_t
set "qty-onhand" = 11000
where productid = 28
  • Related