我想从Firebird 2.1存储过程中获取特定行的ID。我好像不记得语法了,这让我发疯了。
这就是Microsoft SQL Server使用的TSQL中代码的外观。
@ID = SELECT ID FROM ADDRESS WHERE
POBox = :POBOX AND
ExtendedAddress = :EXTENDEDADDRESS AND
StreetAddress = :STREETADDRESS AND
Locality = :LOCALITY AND
Region = :REGION AND
PostalCode = :POSTALCODE AND
CountryName = :COUNTRYNAME;
火鸟相当于什么?
更新
:
Firebird SQL migration guide
建议这应该有效
SELECT ID INTO :ID FROM ADDRESS WHERE
POBox = :POBOX AND
ExtendedAddress = :EXTENDEDADDRESS AND
StreetAddress = :STREETADDRESS AND
Locality = :LOCALITY AND
Region = :REGION AND
PostalCode = :POSTALCODE AND
CountryName = :COUNTRYNAME;
但是,当我尝试创建存储过程时,“into”处会出现语法错误。