This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Head First SQL : SQL Syntax

 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi author,

I have a question regarding the syntax of SQL. why user have to use the different SQL statement to doing the same opertion in different databases, for example.

MySQL database used "auto_increament" keyword to create auto increatment field and Oracle is used "sequences" do the same.

so it difficult to say that, which database is using standard SQL

Thanks in Advance,
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is because different database vendors have implemented different extension to standard SQL as it suits their needs. So, technically, using auto_increment is not SQL (as it is defined in the ANSI standard).

You can avoid these issues by using an abstraction layer such as Hibernate.
[ October 18, 2007: Message edited by: Paul Sturrock ]
 
author
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or more simply, learn the concepts and then get a good reference book for your particular flavor. I think it's safe to say that most people will only be working with one RDBMS at any particular time, and learning your system's syntax is not going to be that difficult.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply paul,

So, technically, using auto_increment is not SQL (as it is defined in the ANSI standard).



is Oracle follow the standard SQL syntax?

You can avoid these issues by using an abstraction layer such as Hibernate.



and thanks for the suggestion paul, I would consider it in future when i will use Hibernate.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks author for your reply,

I think it's safe to say that most people will only be working with one RDBMS at any particular time, and learning your system's syntax is not going to be that difficult.



agreed,

Originally posted by Lynn Beighley:
Or more simply, learn the concepts and then get a good reference book for your particular flavor.



so in which flavor HFSQL is guide their readers? mean is this book follow the standard SQL?

one more thing, is this covers the different database standard for example, Standand SQL syntax is using abc syntax for doing this task, while mysql is doing this in XYZ way.


Thanks for your reply,
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


is Oracle follow the standard SQL syntax?


I can't think of any RDBMS that 100% follows the standard. Usually, all implement it to some degree or other, then extend the functionality depending on what extra stuff their product can do.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:

I can't think of any RDBMS that 100% follows the standard. Usually, all implement it to some degree or other, then extend the functionality depending on what extra stuff their product can do.



Thanks for your reply paul,

now it almost clear, but if they have extends SQL then they shouldn't be use single word SQL (as SQL have its Standards). MySQL name make sense to me after this discussion.
 
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic