Reputation: 4038
I am trying to insert now() value into a column but it shows error
insert into tbl_offerpriceuser('urgentdate') values(NOW()) where user_id='717'
It shows 3 errors
3 errors were found during analysis.
A comma or a closing bracket was expected (near "(" at position 55)
Unexpected token. (near ")" at position 56)
Unexpected token. (near ")" at position 57)
Upvotes: 0
Views: 1893
Reputation: 4501
Syntax is wrong for insert:
insert into tbl_offerpriceuser(urgentdate) values(NOW())
NOW()
function don't have any problem. And there is no WHERE
condition.
See the Syntax to Insert data
Upvotes: 3
Reputation: 386
Thats the correct syntax:
INSERT INTO tbl_offerpriceuser(`urgentdate`) values(NOW()) WHERE `user_id`='717'
Upvotes: -2
Reputation: 1455
There is no where clause in insert statements
insert into tbl_offerpriceuser('urgentdate') values(NOW());
Upvotes: 1