SQL queries among different servers

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

Does the sql queries/statements look the same in other SQL servers as in MySQL?

Like would:
SQL Code: [ Select ]
SELECT * FROM `table_users` WHERE `userID` = 1;

Be the same for all SQL servers? (MySQL, SQLite, PostgreSQL...)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Poly
  • Guru
  • Guru
  • User avatar
  • Posts: 1091
  • Loc: Same place you left me.

Post 3+ Months Ago

In the case of the example SELECT statement you shared, yes it will function across MySQL, SQLite, PostgreSQL, Oracle Database and MSSQL. That being said, not all syntax is the same. Is there a specific query you were interested in?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

No, not really. I'm just finishing up on creating an abstract class (+ 1 child class for MySQLi) for a utility (or group of) to connect to a database.

I want to create one abstract class which would be extended by classes named 'class mysqli extends database', 'class postgresql extends database' and so on and so forth.

Getting that somewhat accomplished, I was thinking about shared features... maybe I could add a function to the abstract class that creates/modifies a query (or a part of) and would be able to be used by all child classes (guess that function could be over-written if needs be).

I searched the internet for the syntax's of different servers but I couldn't find much information. What I did find though looks just the same as for MySQL(i)...

I'm just wondering on the compatibility of my abstract class with the other servers.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 103 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.