|
nt, in _pageIndex int, in _pageSize int, out _totalRecCount int ) begin set @categoryId = _categoryId; set @startRow = _pageIndex * _pageSize; set @pageSize = _pageSize; prepare PageSql from select sql_calc_found_rows * from product where categoryId = order by ProductId desc limit , ; execute PageSql using @categoryId, @startRow, @pageSize; deallocate prepare PageSql; set _totalRecCount = found_rows(); end MySQL与SQL Server的差别实在太多,以上只是列出了本人认为经常在写存储过程中会遇到的一些具体的差别之处。
|