Karthik VU
Karthik VU

Reputation: 561

Reverse engineer the structure of a database based on queries that are used

I am reverse engineering a java code and trying to create a Database Structure. i encounter many queries like

    select AVG(SEN.READING_SENSOR_TEMP) as AVGTEMPREAD, from sensor_readings sen

Now I am confused as to what is the db, table and column. Please help me in understanding the Query.

Upvotes: 0

Views: 160

Answers (1)

Robert
Robert

Reputation: 25763

DB: there is no name of DB
Table: sensor_readings (directly after from)
Column: READING_SENSOR_TEMP (AVG function take column as an argument) 

Probably SEN is confusing for you. SEN is an alias - you can use it instead of full name of the table.

Upvotes: 1

Related Questions