【发布时间】:2011-12-06 01:39:32
【问题描述】:
我想在 SQLite 中声明一个变量,并在insert 操作中使用它。
就像在 MS SQL 中一样:
declare @name as varchar(10)
set name = 'name'
select * from table where name = @name
例如,我需要获取last_insert_row 并在insert 中使用它。
我发现了一些关于绑定的东西,但我并没有完全理解它。
【问题讨论】:
-
sqlite 不支持这个。
-
希望现在有更好的解决方案 - 2018 年 8 月
标签: sql sqlite variables declaration