T
T
true2021-12-31 23:11:01
SQLite
true, 2021-12-31 23:11:01

Is it possible to not specify the data type in a sqlite table cell?

it seems like the typing is dynamic

$sql = "CREATE TABLE t1(
      	c1 TEXT,
      	c2 TEXT
      );";


can it be shortened to:
$sql = "CREATE TABLE t1(
      	c1,
      	c2
      );";


or put TEXT and then, for example, assign numbers

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-01-01
@vabka

No. Each table column must have a specific type.

R
rPman, 2021-01-01
@rPman

yes, by assigning the text type to the field, you can write numbers into it
when you try to write text into the numeric field - this will also work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question