Results 1 to 6 of 6

Thread: Difference in SQL?

  1. #1
    Join Date
    Apr 2010
    Location
    localhost
    Posts
    4

    Difference in SQL?

    I see that many people post answers or query strings that are like...

    SELECT * FROM products WHERE sku='something'

    If I pass a query string like that the server has a hissy fit, it seems that the MySQL my web host uses required the following type of string

    SELECT * FROM `products` WHERE `sku`='something'

    The difference being the back ticks.

    Anyone care to elaborate on this, is it a newer version of SQL?

  2. #2
    Join Date
    Jan 2010
    Posts
    37
    It could just be a difference in the implementation of SQL that mySQL uses versus what other DBMS vendors use. Each vendor tends to have their own implementation that varies somewhat from the ANSI standard, and as a result language that works in one environment may not work in another.

  3. #3
    Join Date
    Apr 2010
    Location
    localhost
    Posts
    4
    Thanks, that partly answers the question but not why one MySQL will take the one version and the version installed on the servers takes another type of string.

    I thought that the whole deal with SQL is to be transparent and have portability but obviously I was wrong and these vendors are still stuck in the dark ages.

    Its been a long time since I touched anything database wise, like DBIII & Foxpro as well as a smattering of Clipper was the last time I played with databases.

    Still, in a way, 20 years on, nice to see that things have not evolved any further than the petty market squabbles of who wants to be on top.

  4. #4
    Join Date
    Jan 2010
    Posts
    37
    Databases are still a highly profitable market. That, coupled with the fact that no one vendor has yet to be fully compliant with Codd's 12 RDMBS rules and each vendor wanting to provide their own unique functionality leads to a lot of proprietary and varied implementations for SQL. I do not think these companies are petty in most cases, it is just that their priorities are towards profits and functionality instead of one standard for interoperability across DBMS's

    Another thing I would check if I were you (if possible) is to see what storage engine is used for the different implementations. mySQL can use different storage engines depending on one's need, and I would imagine that this could lead to differences in syntax needed, as the storage engines are handled by different parties.

  5. #5
    Join Date
    Apr 2010
    Location
    localhost
    Posts
    4
    In my case I chose the one thats default, MyISAM and the character set says its latin_sweedish_ci

    Any idea where I can get some reading materials on MySQL about which tables suit what apps? (and don't say MySQL site as its a horrid nightmare that never tells me anything I want to know, I do seriously hope some day that the people who make the SQL site sit down and read up about readability in web designs and then do something about their own site.)

  6. #6
    Join Date
    Jan 2010
    Posts
    37
    I cannot recommend anything, as I do not work with mySQL, just MSSQL. If the website is not satisfying your needs though, then why not look into getting a book and reading up on the subject? Better yet, Oracle has learning paths on database development with mySQL that should not only teach you mySQL, but make you eligible for certification too, which should increase your value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •