在SQLite3中插入和检索数组数据

时间:2015-05-01 07:56:17

标签: arrays sqlite

考虑以下

CREATE TABLE test (
  no integer primary key,
  name varchar(15) not null,
  value1 integer not null,
  value2 integer not null,
  value3 integer not null,
  salary decimal(13, 2) not null
);
INSERT INTO "test" VALUES(1,'Kid1',100,10,20);
INSERT INTO "test" VALUES(2,'Kid2',200,700,10);

这将创建下表。

No   Name   Value1  Value2  Value3
----------------------------------
1   Kid1     100      10     20    
2   Kid2     200     700     10       

假设我有字段' Value1',' Value2',...,' Value100'因此以上述方式插入值是无效的。是否可以在数组中存储100个值并将值插入数据库?以类似的方式可以使用数组检索吗?

0 个答案:

没有答案
相关问题