摘要:
今天工作中遇到一句这样的SQL语句,很不懂:Minimsdn.com为您提供的代码:WITHLSN AS( SELECT from_lsn = sys.fn_cdc_get_min_lsn(N'dbo_tb'), to_lsn = sys.fn_cdc_get_max_lsn()),CHG_ALL AS( SELECT CHG.* FROM LSN CROSS APPLY cdc.fn_cdc_get_all_changes_dbo_tb(LSN.from_lsn, LSN.to_lsn, 'ALL UPDATE OLD... 阅读全文