我有名为db_Database数据库,现在在数据处理过程中创建了临时表#t_temp,现在想在这个临时表bytecount列上创建索引,我的做法是
create index idx_bytecount
on #t_temp (bytecount)
但系统报错:无法在 '#t_temp' 上创建索引,因为此表在数据库 'db_Database' 中不存在。
请问这是为什么呢?临时表有特殊的建立索引的方法吗?请问我该怎么做?谢谢!
create index idx_bytecount
on #t_temp (bytecount)
但系统报错:无法在 '#t_temp' 上创建索引,因为此表在数据库 'db_Database' 中不存在。
请问这是为什么呢?临时表有特殊的建立索引的方法吗?请问我该怎么做?谢谢!
on #t_temp (bytecount) 要跟创建#t_temp的语句放在一起.
create index idx_bytecount
on ##t_temp (bytecount)
on #t_temp (bytecount)
是和该当存储过程放在一起的吗?
-------------------------
create table #t_temp
(
...
)create index idx_bytecount
on #t_temp (bytecount)