-3

I'm trying to understand what does aec and aer do in a SQL Query

For ex:

SELECT * FROM schema1.tablename1 aec
 

SELECT * FROM schema1.tablename2 aer
wagonr
  • 5
  • 3

2 Answers2

0

You may have a look at the "alias" concept: https://www.db2tutorial.com/db2-basics/db2-alias/

When you use (and it's the same for the second query):

SELECT * FROM schema1.tablename1 aec

What you actually mean is that from there on you are referring to schema1.tablename1 as "aec", so you could do for example the following:

SELECT aec.* FROM schema1.tablename1 aec
mbd
  • 346
  • 1
  • 9
0

I Think, there is no particular sql query commands as "aec" and "aer" from your code I can understand that query line:1

SELECT * FROM schema1.tablename1 aec

refers the tablename1 as "aec"; similar to "alias"

and same for the line:2

SELECT aec.* FROM schema1.tablename1 aec

refers the tablename1 again with "aec"; similar to "alias"

Hope it helps, don't stop you own research until it satisfies you :)

Niranjan
  • 38
  • 5