如何在sybase数据库中检查一个表是否存在,如存在就删除表记录,如不存在就建表。

2025-03-25 13:11:44
推荐回答(2个)
回答1:

if exists( select 1 from sysobjects where name="表名" and sysstat & 15 = 4 )
drop table 表名
go
create table 表名
(
......
)
go

回答2:

你那是什么数据库啊?