0

我有以下 SQL

set @ID = '323232'

select 
    tt.ItemOrder, tt.DisplayVal,
    ActualDate = (select mfdate from mfseries where Id = @ID)
from 
    tblTime tt

有没有办法简化这个查询而不使用子查询?

4

1 回答 1

1
DECLARE @date datetime

select @date = mfdate from mfseries where Id = @ID

select tt.ItemOrder,tt.DisplayVal,@date As ActualDate
from tblTime tt
于 2012-08-09T19:24:29.477 回答