当然,SqlServer中并不只有这一种写法,只是这种写法是比较常见而已。 MySqlcreateprocedureGetProductsByCategoryId(in_categoryIdint,in_pageIndexint,in_pageSizeint, out _totalRecCountint)beginset@categoryId=_categoryId;set@startRow=_pageIndex*_pageSize;set@pageSize=_pageSize;preparePageSqlfrom'select sql_...