开发者

how to check mssql existing table in php

Does anyone know how can I check whether the selected table in mssql is exist by php?开发者_C百科?


The following SQL query should work:

SELECT COUNT(table_name) FROM information_schema.tables WHERE table_name = 'SomeTableName'"

Should return a count of 0 if it doesn't exist or 1 if it does.

Use with msql_query or sqlsrv_query as appropriate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜