Tuesday, June 16, 2009

Oracle/Sybase Discovery

I'm not sure I can bring you a lot of value today, but maybe just this one small bit of info will help you discover a wealth of information. After doing Oracle and SQL Server for many years, I am now learning Sybase as well. Here's today's discovery:

What is called an "inline view" in Oracle is called a "derived table" in Sybase. Derived Tables have been available in Sybase since ASE 12.5.2.

I was happily surprised to find that the column aliases can be used to select from the derived table.

Another thing I learned was that the derived table must have a name. Here's a simple example:

select * from
(select sum(advance) from total_sales) dt

"dt" is the name in this example.

No comments: