确定 SQL Server CE 中是否存在表? [英] Determine if table exists in SQL Server CE?

查看:31
本文介绍了确定 SQL Server CE 中是否存在表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这类似于这个问题,但我将 SQL Server CE 3.5 与 C# 中的 WinForms 项目一起使用.如何判断表是否存在?我知道 IF 关键字不受支持,但 EXISTS 是.信息模式是否存在于 CE 中,我可以在其中查询它?谢谢.

I know this is similar to this question, but I'm using SQL Server CE 3.5 with a WinForms project in C#. How can I determine whether a table exists? I know the IF keyword is not supported, though EXISTS is. Does information_schema exist in CE where I can query against it? Thanks.

推荐答案

是的,它确实存在:

SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'TableName'

这篇关于确定 SQL Server CE 中是否存在表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆