当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: <% set a = server.createobject("scripting.dictionary") set b = server.createobject("scripting.dictionary") call a.add("key","a1") call b.add("b1&quo......
    摘要: 下面是一段小程序,主要是把一个unsigned int型数据用fwrite()保存到一个文件中,然后用fread()读出来,但是发现读出来的和我写进去的数不相同,请问是什么原因?是在vc6.0下写的程序. #include "stdafx.h" #include <iostream.h> //***********// void main( void ) {......


如何判断一个表是否存在

如题?

NO.1   作者: realgz

if   exists   (select   *   from   sysobjects   where   name=you   table   and   xtype=U)  
  begin  
  ...........  
  end

NO.2   作者: txlicenhe

if   object_id(表名)   is   not   null  
  print   Yes  
  else  
  print   No

NO.3   作者: yown

exists   (select   *   from   sysobjects   where   name=tablename   and   xtype=U)

NO.4   作者: lovehwq21

if   exists   (select   *   from   sysobjects   where   name=tablename   and   xtype=U)  
        print   表存在  
  else  
        print   表不存在

NO.5   作者: aierong

 
  if   exists(select   *   from   INFORMATION_SCHEMA.TABLES   where   table_name=tablename)  
  print   exist  
  else    
  print   no   exist  
   
   
   
   
  再给你一个方法

NO.6   作者: trunman

if   exists   (select   1   from   sysobjects   where   name=tablename   and   xtype=U)  
        begin    
        print   exists  
        end    
  else  
        begin  
        print   not   exists  
        end    
 


    摘要: pengdali (大力) net_lover (孟子e章) technofantasy (陈锐) playyuer (小干部儿) icyer (杨永贵) fason (阿信) meizz (梅花雪) qiushuiwuhen (秋水无恨) ceocio (ceocio) tj_dns (愉快的登山者) lihonggen0 (李洪根) happydreamer (小黑) zhy97......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE