开发者

Script to drop an index if it exists that works in SQL Server 2005 AND SQL Server Compact 3.5

开发者 https://www.devze.com 2022-12-29 18:22 出处:网络
I have an application with a rather long chain of upgrade scripts. The application works in SQL Server 2005 - I\'m trying to upgrade it so it will also work in SQL Compact 3.5

I have an application with a rather long chain of upgrade scripts. The application works in SQL Server 2005 - I'm trying to upgrade it so it will also work in SQL Compact 3.5

Part of the script involves dropping old indexes if they exist.

I REALLY want to have one开发者_如何学Python script that can handle both scenarios. I've been having a lot of success so far. But I think I'm in trouble with this one.

Is there a way to do this in one script? Or do I need to keep two versions?


You could just DROP the index in SQL Compact and ignore any errors??


Compact is a completely different product than the full SQL Server. If you need things to work exactly the same on all platforms, then you should be using SQL Server Express instead of Compact, as Express is fully compatible with the full version of SQL Server.

If you must continue using compact, then you will need to maintain two different versions of the scripts.

0

精彩评论

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

关注公众号