当前位置: 代码迷 >> ASP.NET >> access 参数查询如何写
  详细解决方案

access 参数查询如何写

热度:5698   发布时间:2013-02-25 00:00:00.0
access 参数查询怎么写
请问下sqlserver的查询在access怎么写,如下:

SELECT           ProductID,   ProductName,   SupplierID,   CategoryID,   QuantityPerUnit,   UnitPrice,   UnitsInStock,   UnitsOnOrder,   ReorderLevel,   Discontinued,
(SELECT   CategoryName   FROM   Categories   WHERE   Categories.CategoryID   =   Products.CategoryID)   as   CategoryName,   (SELECT   CompanyName   FROM   Suppliers   WHERE   Suppliers.SupplierID   =   Products.SupplierID)   as   SupplierName
FROM   Products   WHERE   (CategoryID   =   @CategoryID)

------解决方案--------------------------------------------------------
把@CategoryID换成?号就可以了,其他的跟sql一样

附:我是在MSDN上看到MS这么写的,自己没试过
  相关解决方案