可以这样:drop table if exists tabname;create table tabname
(
  ...
);

解决方案 »

  1.   

    不可以啊,我要alter,不要drop啊,谢谢.
      

  2.   

    alter 和 先 delete  再 create 有什么区别吗?
      

  3.   

    select 1 from information_schema.tables where table_name = 'account';if found_rows() = 1 then   ....end if;不知道能不能满足要求.
      

  4.   

    我想直接在sql里实现,看来是没什么办法了啊;
    mysql好象没有if那些流程语句
      

  5.   

    if exists (select * from sysobjects where xtype = 'u' and id = object_id(N'tablename') 
    ....
      

  6.   

    这个是 sql server 中的。 呵呵.