达梦查询数据库是否存在:
select COUNT(1) from sysobjects where NAME=‘DB1’ and SUBTYPE$ is null
达梦查询数据库表是否存在:
select COUNT(1) from dba_segments where dba_segments.OWNER=‘DB1’ and SEGMENT_NAME=‘table1’

Logo

一站式 AI 云服务平台

更多推荐