sqlserver ( Limit )

    技术2022-05-11  77

    select count(*) as n from tblcontact where email='' and officeid_fk in --select count(*) as n from tblcontact where email='' and firstname='' and lastname='' and officeid_fk in ( select officeid_pk from tbloffice where companyid_fk in ( select companyid_fk from tblMCOCControl where contactnum>0 and ( RecordID_pk >= (SELECT max(RecordID_pk) AS RecordID_pk FROM tblMCOCControl WHERE contactnum>0 and RecordID_pk IN (SELECT TOP 1 RecordID_pk FROM tblMCOCControl where contactnum>0)) )AND (RecordID_pk <= (SELECT MAX(RecordID_pk) AS RecordID_pk FROM tblMCOCControl WHERE contactnum>0 and RecordID_pk IN (SELECT TOP 1000 RecordID_pk FROM tblMCOCControl where contactnum>0 )))) )

    最新回复(0)