• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic