我记着好像可以select GoodsName from Goods where ID in ??? 怎么写 是oracle数据库 或者有什么别的方法?讲究效率,因为别的方法返回的是个参数数组string []
------解决方案--------------------
string.Format("select GoodsName from Goods where ID in {0}", string[]) 试试…
------解决方案--------------------
VB.NET code
Dim id() As String = {"1", "2", "3"}
Dim str As String = String.Empty
For Each s In id
str = str & s & ","
Next
str = String.Format("select GoodsName from Goods where ID in ({0})", str.Substring(0, str.Length - 1))
MessageBox.Show(str)
------解决方案--------------------