• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

What are these SQL words?

 
Ranch Hand
Posts: 954
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know standard SQL such as ORACLE.

I often see keywords like these that developers have in their code.  It seems like something on top of SQL.  I don't know what they are.  I'd be happy to know what they are and then I can read about the topic.  If someone had time,  I'd like to know what they are:

AFTER
FOR
WHEN
BEGIN
REFERENCING
CAST

I wish there was a Forum choice of Database SQL newbie.   My question is not advanced enough to fit into any existing drop down category.

Thaniks,

Kevin
 
Bartender
Posts: 1159
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of the database vendors extend standard SQL(*) with extra functionality.  
Oracle has PL/SQL which is a cursor-based language - in simplistic terms this allows you to create "loops".

They always have good documentation (and lots of it!) -PL/SQL Language Elements

(*) if there is a standard!  
 
kevin Abel
Ranch Hand
Posts: 954
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,

I remembered it being part of SQL but I wasn't sure if I needed to use an add on of some kind.  Now I know it is part of Oracle or probably also built into other SQLs.

I can now look in the Oracle documentation to learn what each one does.

Thanks,

Kevin
 
kevin Abel
Ranch Hand
Posts: 954
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,

I went to the link and I see a lot of information about PL1 but not the simple looking words I mentioned.  I'm wondering if they are something else.  It looks like PL / ORACLE but I don't know why the keywords are not in the documentation.

Kevin
 
Peter Rooke
Bartender
Posts: 1159
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some of these words are part of longer PL/SQL commands,After Update and For loop
 
kevin Abel
Ranch Hand
Posts: 954
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Peter...Appreciated
 
Saloon Keeper
Posts: 28404
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kevin Abel wrote:Peter,

I went to the link and I see a lot of information about PL1 but not the simple looking words I mentioned.  I'm wondering if they are something else.  It looks like PL / ORACLE but I don't know why the keywords are not in the documentation.

Kevin


PL1, also known as PL/1, PL/I, Programming Language/1*, was a language developed by IBM in the later 1960s (I think). It was an attempt to create a "universal" language for their mainframe computers. Prior to that, languages tended to be more specialized: Fortran for scientific computing, COBOL for business computing. PL/1 syntax was more like the formulaic Fortran than the verbose COBOL, but it supported some of the hardware data types that COBOL allowed but Fortran did not (for example, BCD-style arithmetic). It was one of the first major languages to adapt to the new-fangled "structured programming" model that became an essential part of OOP.

It wasn't as popular as Fortran and COBOL (both of which were available for free from IBM, where PL/1 was not), but it did see some commercial use. I worked with it at my first computer job, in fact. It had an optimising compiler (extra-cost) product back when most compilers were non-optimising.

Fred Brooks held it up as a systems programming language in his seminal book The Mythical Man-Month and IBM did, in fact develop a dialect of it called PL/S that was used to write much of the IBM OS/VS operating system code. PL/S was closer to the hardware (vanilla PL/1 code couldn't operate in the specialised internal environment of an operating system). And, alas, for those of us doing OS-level coding outside of IBM, they wouldn't share it. We spent literally years trying to find a suitable equivalent.

As a side note, the Prime Computer company (perhaps best noted for using Dr. Who as a spokesman) had originally designed their hardware to optimally run Fortran, but Fortran has certain limitations such as not being originally designed as a structured programming language nor easily adaptable to that paradigm, so in the 1980s, Prime adapted a dialect of PL/1 to be the new systems  programming language for their OS products. Unlike IBM, they made it available for free to customers.

PL/1 syntax was almost certainly influenced by Algol, though Algol was never very popular in the USA. And from thence we get C and finally Java.

SQL does have primitive a PL/1-like syntax. which wouldn't be surprising since SQL has roots at IBM and IBM has a fairly consistent model for all of the language-like products that they produce such as OS system utilities.

However, having said all that. PL/1 is not PL/SQL nor SQL and any overlaps in keywords between them are purely incidental.

---
* IBM apparently liked the name so much that they also copyrighted PL/2 through PL/99 for future use.
 
Author
Posts: 51
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PL/SQL is a procedural extension of SQL. It runs inside the Oracle Database products and was created in the early nineties.
With PL/SQL, you can write procedures that are stored in the database.
Such procedures can be included in packages (similar to Java packages).
Another big benefit of PL/SQL is strong exception handling.
SQL can be embedded in PL/SQL, though there are reasons for not doing this (excessively).
 
Peter Rooke
Bartender
Posts: 1159
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

was a language developed by IBM


Oh, I never knew that.  Way back I was developing using Informix 4GL/SQL.  Back then Informix were the major rivals to Oracle Highway 101 Billboard and eventually lost out.  
 
You can't have everything. Where would you put it?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic