L
L
Lucky_Student2013-04-29 15:17:27
SQL
Lucky_Student, 2013-04-29 15:17:27

SQLite - working with text (varchar)?

You need to update via update, which will add one letter to the line. My attempt:
create table Test(
Num varchar(6)
);
UPDATE Test
SET Num=Num+"x";
was not crowned with success, tk. Arithmetic operations cannot be applied to varchar fields.
Concate from SQL cannot be used either, as well as some other things from SQL.
In general, I honestly tried to google the answer for a long time, but it doesn’t work.
Can you help?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mithgol, 2013-04-29
@Mithgol

To concatenate (join) text strings in the SQLite language, it is not a plus, but the “||” operator, according to the operator documentation .

O
Otkrick, 2013-04-29
@Otkrick

SQLite data types : INTEGER, REAL, TEXT, BLOB or NULL. Use text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question