开发者

Complex INSERT and check MySql query

开发者 https://www.devze.com 2023-02-01 11:30 出处:网络
Is it possible to do the following with开发者_JS百科 a single MySql Query. INPUT: a list of several words to processed

Is it possible to do the following with开发者_JS百科 a single MySql Query.

INPUT: a list of several words to processed

I have a dictionary in table 2 and each word in it has an id. If an inputted word is in the dictionary, its dictionary id should be added to table 2 as a row. If not the word itself should be added to table 3.

OUTPUT: All the values that were added to table 3


Maybe not with a single MySQL query, but you might be able to hack it together using a Trigger.

http://dev.mysql.com/doc/refman/5.0/en/triggers.html

0

精彩评论

暂无评论...
验证码 换一张
取 消