[英]NexusDB for each loop / substitute
I need a little push up.我需要一点俯卧撑。 I have a temporary table created from a select.我有一个从 select 创建的临时表。
Now I need to go through that table and for each record in that table I need to do insert to other table with some values from this temporary tables.现在我需要 go 通过该表,对于该表中的每条记录,我需要使用该临时表中的一些值插入到其他表中。
Anyway I can't figure out any way how to do it in NexusDB.无论如何,我无法弄清楚如何在 NexusDB 中做到这一点。
Simply I want to do this in nexusdb sql:只是我想在 nexusdb sql 中执行此操作:
foreach(record in table1){
insert into table2 (columns) values record.id, record.name ... etc.
}
I hope it does make sense to you guys and I look forward to some beautiful ideas of yours.我希望它对你们有意义,我期待你们的一些美好的想法。
Thanks.谢谢。
NexusDB does not need "foreach", you can do it like this: NexusDB 不需要“foreach”,你可以这样做:
insert into temp1 (field_2, field_3) (SELECT field_2, field_3 FROM temp2)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.