想要实现如下的功能: 3个变量, 分别从 表中的 3列中得到

类似于 :   

exch product templateID = exec ExchangeID,ProductID,TimeTemplateID from Instruments where InstrumentID=`IF2201


如何用一个语句中 得到? 目前我只能按照如下实现

exch= select ExchangeID from Instruments where upper(InstrumentID)==`IF2201

product = select ProductID from Instruments where upper(InstrumentID)==`IF2201

template = select TimeTemplateID from Instruments where upper(InstrumentID)=`IF2201


请问是否有简洁一点的写法



请先 登录 后评论

1 个回答

Yating Xie
v = exec exch, product, templateID from t where templateID = "IBM"
exch, product, templateID = v[0], v[1], v[2]


attachments-2021-12-DLRDjqMu61bc0f68c5e15.png

请先 登录 后评论