|
Question : DROP TABLE IF EXISTS tblName
|
|
Hello, im trying to get this command to work in access....
What is the equivlent to this command?
I am using MySQL as my main database, however I want to become more universal and allow my users to use MSAccess also.
|
|
Answer : DROP TABLE IF EXISTS tblName
|
|
Jet has no control of flow execution in its SQL syntax. It executes a single command. So there's no ability to check *IF* a table exists and *THEN* execute it - as that would be more than one statement.
Jet is good at what it's intended for - but is in no way intended to perform conditional statements. (Some VBA integration makes certain data statements checkable - but not DDL). It's entirely appropriate with Jet to do such handling in the executing code (as Scott - LSMConsulting - suggested).
Hence it's important to remember the distinction. You're talking about using a *Jet* mdb as your data source. Not Access - which is database application development too quite at home using Jet, mySQL, MS-SQL etc as it's data source - just like VB.NET is. Jet has limitations - and has made no attempt to stretch beyond them (MS offer SQL Server for that after all :-)
|
|
|
|