how can i check whether a table exists in the database (ACCESS or SQL) in C# -
i found lot of questions regarding question.
but there simple statements accomplish task?
for both sql , access
if (exists (select 1 sys.tables name = 'table_name')) begin -- stuff end
sys.tables can give information table object, e.g. is_replicated
column tells if table created replication or has_replication_filter
column tells if table has replication filter set up
nb: sql server
edit: access:
select count(*) exists msysobjects type = 1 , name = 'my_table_name'
Comments
Post a Comment