我在存储过程中使用Sybase 15 SQL.我想在临时#table上识别索引.常用技术适用于永久表,但不适用于临时表:
--look for an index on a temporary table
create table #T1( duff int)
create index idx99 on #T1(duff)
select * from sysindexes where name = 'idx99' --returns null rows !
--Look for an index on a permanent table
create table T1( duff int)
create index idx99 on T1(duff)
select * from sysindexes where name = 'idx99' --returns a row. OK for perm table.
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
短发