I've created a table in griddb using this query:
CREATE TABLE tbl1 (
id INTEGER NOT NULL,
name STRING
);
When I try to insert a record using insert query it returns this error:
D20332: An unexpected error occurred while executing a SQL. :
msg=[[240008:SQL_COMPILE_COLUMN_NOT_FOUND] Column not found (name=John Doe) on updating (sql="insert INTO tbl1 (id, name) VALUES (1, "John Doe")") (db='public') (user='admin') (appName='gs_sh') (clientId='ddd01cd4-3370-4a12-a62f-ce3a652540d5:2') (source={clientId=3, address=127.0.0.1:54084}) (address=127.0.0.1:20001, partitionId=246)]
This is my insert query:
INSERT INTO tbl1 (id, name) VALUES (1, "John Doe");
What am I doing wrong here?
I recently encountered a similar error and followed the comment by jarlh
Using a single quote helps fix the error. Try using;
INSERT INTO tbl1 (id, name) VALUES (1, 'John Doe');
OR
INSERT INTO tbl1 VALUES (1, 'John Doe');