Finding SQLTERMs and their definitions for [b]Oracle SQL[/b] & [b]SQL Server[/b]

I dug for about an hour last night on the subject of SQLTERMs and their definitions for Oracle SQLSQL Server and a few others.

I noticed that some of the terms are generic then realized that some of the sites did not have even some of the basics. SELECT FROM WHERE  ORDERBY etc.

With that, I wondered if I was looking at terms and definitions of databases vs the CODE. So is there a really good site for finding out what specific code like functions or operations do in a SQL query?
This would be very helpful to me since I have been trying to breakdown many of the parts of the query and what each term means so I can decipher and create my own...?
Not this stuff. I understand this. https://raima.com/database-terminology/ 
What each type of code is and does....? Like Create Table or maybe it is insert table commands.

I figured you guys would know the best stuff. So rather than hope I hit a home run? I'll get on base and you can hit the home run.
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulEE Topic AdvisorCommented:
Despite the fact that ANSI standards exist for SQL, each database vendor has a slightly different implementation of SQL. On top of that, most of the RDBMS vendors also offer their own "procedural language" extensions to SQL - and these differ much more than the SQL elements do.

For SQL some basic elements remains utterly consistent, e.g. the order of clauses in a select statement

[WITH]
SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

Beyond these similarities however there are a wide range of functions that are unique to each dbms that are quite frustrating to deal with. A good example is replacing a NULL with a value.

In Oracle NVL() is the "native" function for replacing a NULL value with some other value e.g. NVL(NULL,'Value is NULL')
In SQL Server the equivalent is ISNULL e.g. ISNULL(NULL,'Value is NULL')
In MySQL the equivalent is IFNULL, e.g. IFNULL(NULL,'Value is NULL')

the SQL standard is COALESCE(NULL,'Value is NULL') and most DBMS platform now support that function (but not all and not all versions either). Additionally COALESCE() also accepts more parameters that NVL or ISNULL or IFNULL

NB:
DATE & TIME functions are amongst the most varied of all. (e.g. this page)
STRING functions are also highly varied (e.g. this page)

So. The overall landscape is the SQL implementations are real quite different. Here are some websites that may assist further:
Comparison of different SQL implementations
SQL Dialects Reference

An online "converter" (not perfect but may be useful): http://www.sqlines.com/online

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PortletPaulEE Topic AdvisorCommented:
If I start with this simple select statement for Oracle:
select
      x
    , y
    , nvl(z,1) z
    , trunc(sysdate) as today
from a
left join b on a.id = b.aid
left join c on b.id = c.bid

Open in new window

Using converter http://www.sqlines.com/online
in SQL Server:
select
      x
    , y
    , isnull(z,1) z
    , convert(datetime, convert(date,getdate())) as today -- but  convert(date,getdate())  is all that is needed
from a
left join b on a.id = b.aid
left join c on b.id = c.bid

Open in new window

for DB2
select
      x
    , y
    , nvl(z,1) z
    , trunc(current_timestamp) as today
from a
left join b on a.id = b.aid
left join c on b.id = c.bid

Open in new window

for MySQL
select
      x
    , y
    , ifnull(z,1) z
    , date(sysdate()) as today -- this is WRONG, is should be:  curdate() as today
from a
left join b on a.id = b.aid
left join c on b.id = c.bid

Open in new window

for PostgreSQL
select
      x
    , y
    , coalesce(z,1) z
    , trunc(current_timestamp) as today
from a
left join b on a.id = b.aid
left join c on b.id = c.bid

Open in new window

So while converters are available take care, they may not always be correct or optimal.
SujithData ArchitectCommented:
Here is a good read on the SQL fundamentals, it explains the components of SQL(select/project/joins etc)
Blocks of the SQL(SELECT/FROM/WHERE/GROUP BY/ORDER BY) etc

https://www.w3schools.com/sql/default.asp
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
This will keep me busy a while gentlemen. Not sure if I should thank you or not? I believe I just lost another 25% of the hairs on my head Just kidding. Good stuff thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.