我有两张桌子。一张表包含单词。其他表包含点。
table words:
id word
table points:
id wordid x y
词列是唯一的。
我想编写存储过程,它接受输入当前 x 值和 word|y 值列表。
例如:
这是初始单词表行:
id word
1 Carrot
2 Apple
3 Potato
我们称之为过程 StoreData(x = 5, words = { Carrot:123, Onion:321 })
。
结果我们有:
Words table:
id word
1 Carrot
2 Apple
3 Potato
4 Onion
Points table:
id wordid x y
1 1 5 123
2 4 5 321
怎么做?