我必须将function
称为select
,同时,我必须select
进入与function
最匹配的select
SELECT field1,
field2,
function(select field3 from table2 where table2.id = table1.id and table2.id = 3)
FROM table1
WHERE ...
。
我试试这个,但它不起作用:
char ch = (char)Console.Read();
我应该如何选择功能?
答案 0 :(得分:0)
你应该将结果联合为
SELECT field1,
field2,
FROM table1
WHERE ...
Union All
Select function(select * from table2 where table2.id = table1.id) --function returning max