📜  in 子句 db2 c# 代码示例

📅  最后修改于: 2022-03-11 14:49:15.989000             🧑  作者: Mango

代码示例1
string[] tags = new string[] { "ruby", "rails", "scruffy", "rubyonrails" };
const string cmdText = "select * from tags where '|' + @tags + '|' like '%|' + Name + '|%'";

using (SqlCommand cmd = new SqlCommand(cmdText)) {
   cmd.Parameters.AddWithValue("@tags", string.Join("|", tags);
}