why are all sql identifiers referenced before assignment?

You are misunderstanding the nature of the SQL language. It is a not a procedural language, but a declarative language. The statement describes what the result should look like, and the database builds the actual query plan accordingly – which, by default, you don’t get to see.

Some databases provide some kind of procedural sub-language, which can be used to write procedures – eg PL/SQL in Oracle. However, what you are showing here is a standard SQL SELECT statement. There is no notion of variable declaration in there. A in the FROM clause is an alias for table_a, aka an identifier, that you can the use to refer to the columns of table, using an expression like <table identifier>.<column name>.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top