M
M
MrGeRoI2017-08-31 04:03:54
SQLite
MrGeRoI, 2017-08-31 04:03:54

Error while querying SQLite: "INSERT INTO VALUES" How to construct the query correctly?

There is a table lol with columns: Name - type "Char" and Count - type "Int"
I want to insert data into them with the following query:
INSERT INTO lol (Name, Count) VALUES ('Jarlo', 3)
Error:
no such column: Jarlo
For some reason, he thinks that Jarlo is a column, although it is data...
Maybe I didn't formulate the query correctly, if so, how should I compose such a query?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolay Baranenko, 2017-08-31
@drno-reg

try replacing data type Name from Char to Text

CREATE TABLE lol (
  Name TEXT,
  Count INTEGER
) ;

INSERT will be like this , everything is added without problems

M
MrGeRoI, 2017-08-31
@MrGeRoI

Works through zopa, but works!
Thank you!
(Not your fault, but the fault of my buggy homemade editor)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question