在windows mobile平台下的sqlce数据库中如何判断一个表是否存在?

解决方案 »

  1.   

    这个不能用吗?select 1 from dbo.sysobjects where id = object_id(N'[dbo].[表名]') and OBJECTPROPERTY(id, N'IsUserTable') = 1
      

  2.   

    if (select object_id('test') ) is not null
        drop table test
    这个能用吗?mobile平台没用过
      

  3.   

    这些在sql server中是没问题的。但SQLCE数据库不支持的。
      

  4.   

    try
    {
    select * from tablename
    }
    catch
    {
    表不存在
    }
      

  5.   

    SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
      

  6.   

    SQLCE 3.1 有这个View