Sql中将string类型转化成int类型并进行连表查询,使用cast()函数:
select dt.name,zl.* from zl_deviceinterface as zl join devicetype as dt on cast(zl.devicetypeid as int)=dt.objectid where dt.name=‘电梯’
Sql中将string类型转化成int类型并进行连表查询,使用cast()函数:
select dt.name,zl.* from zl_deviceinterface as zl join devicetype as dt on cast(zl.devicetypeid as int)=dt.objectid where dt.name=‘电梯’