- 2022-08-26SQL Server 表增加字段案例语句
IFNOTEXISTS(SELECT1FROMsys.sysobjects(NOLOCK)soINNERJOINsys.syscolumns(NOLOCK)scONso.id=sc.idWHEREso.name='EgSys_ActualFrei
- 2022-08-26SQL Server 新建表案例语句
GOIFNOTEXISTS(SELECT1FROMsys.objectsoWHEREo.name='EgSys_ActualFreightSurcharge'ANDo.type='u')BEGINCREATETABLE[
- 2022-08-26SQL Server游标的使用案例
SELECT*INTObackup_db.dbo.EgSys_ActualFreightDetail_202208251630FROMEgSys_ActualFreightDetail(NOLOCK);BEGINDECLARE@DetailIDINT;DECLARE@PackageFee