Rod*_*Rod 9 sql t-sql sql-server null temp-tables
有没有办法将datetime value(getdate())插入/更新到如下所示的临时表中:
select id, null as testdate
into #temp_table
Run Code Online (Sandbox Code Playgroud)
然后声明:
update #temp_table 
set testdate=getdate()
Run Code Online (Sandbox Code Playgroud)
我收到错误:
无法将datetime转换为int ...
谢谢.
小智 16
在select into中插入列
select id, cast(null as datetime) as testdate
into #temp_table
Run Code Online (Sandbox Code Playgroud)
        |   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           5033 次  |  
        
|   最近记录:  |