我有两个表table1和table2,两个都包含ID列。我想找到table2的max(ID)和table2的max(ID),如果两个max ID相同,我将使用.exe调用C#程序。
Create table table1(ID int not null,
CONSTRAINT [pkid1] PRIMARY KEY CLUSTERED
(
[Id] ASC
));
Create table table2(ID int not null,
CONSTRAINT [pkid2] PRIMARY KEY CLUSTERED
(
[Id] ASC
));
@ECHO ON
echo running batch file
if ((select max(ID) from table1)=(select max(ID) from table2)) call D:\atest\bin\debug\atest.exe
现在如何在批处理文件中包含此if语句? 感谢
MR