-1
我有List myint = new List();如何在Ms sql服务器中选择多个记录
我想选择多个类似的productid = 1的productid = 2
如何选择使用MS SQL Server的多种产品
select * from product where ProductId = 1,2
我有List myint = new List();如何在Ms sql服务器中选择多个记录
我想选择多个类似的productid = 1的productid = 2
如何选择使用MS SQL Server的多种产品
select * from product where ProductId = 1,2
select * from product where ProductId in(1,2)
你可以写在此查询两种方式,
SELECT * FROM Products
WHERE ProductID IN (1,2)
或
SELECT * FROM Products
WHERE ProductID = 1
OR ProductID = 2
您正在使用什么版本的SQL Server?它是什么类型的应用程序? '.net'? –