Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First SQL : SQL Syntax

 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • 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,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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 ]
 
Lynn Beighley
author
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • 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: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • 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
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic