MySQL Forums
Forum List  »  Microsoft SQL Server

Re: SQL on unix and on windows
Posted by: Michael Maddox
Date: July 26, 2004 08:33AM

The essence of your question shows a simple misunderstanding about database systems.

1. The operating system that a relational database management system (RDBMS) is running upon has little or no effect on the underlying SQL syntax that is used by the RDBMS. In other words, a MySQL system running on Windows will use the same SQL syntax as a MySQL system running on 'nix. There MAY be differences, however, in the SQL syntax used in different RDBMS systems, regardless of the platform they run on (i.e., SQL syntax in MySQL will be different from the T-SQL syntax used in MS SQL Server--even on the same OS platform). Generally though, RDBMS manufacturers claim some amount of SQL spec compliance, so queries will often appear similar--even identical across SQL-compliant RDBMSes. Your CREATE TABLE statement is essentially correct for most SQL-compliant syntaxes, although the final "type=ISAM" syntax does not exist in SQL Server's T-SQL.

2. Connectivity APIs (application programming interfaces--how you get to the database) vary wildly across OSes--particularly NATIVE connectivity APIs. Since you're making use of PHP, your code relies on the connectivity API MySQL exposes to PHP (I'm not a PHP programmer, so forgive my total lack of knowledge here.). You could modify your code to make use of the primary API on Windows (although it exists on other platforms) --ODBC, or another variant available for PHP on Windows (ADO, etc.).

To make your code work on a Windows platform, you would need to:
a) have a database created in the RDBMS used by your ISP
b) modify your connectivity code to get to the RDBMS
c) modify your SQL to fit the particular variation of the SQL-syntax used by that RDBMS

It's not something done "automagically," but it shouldn't be nearly as hard as it might appear. Good luck!

Michael Maddox
Sr. Software Engineer
Tallahassee, FL USA

Options: ReplyQuote

Written By
July 11, 2004 07:00AM
Re: SQL on unix and on windows
July 26, 2004 08:33AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.