I am using PostGreSql as database
, I have tables in pgAdmin
.
I want to set as alias
to table myData
. I have tried using AS
or ALIAS
but nothing works for me.
Here is my class
class Product extends Model{
constructor(conn, schema){
super(conn, schema, "product", {
// fields
},true);
}
// function
async getNextData() {
try {
const data = await this._conn.query(`
select *
from ${this._schema}."terms", ${this._schema}."myData" ------>>>> ALIAS THIS TABLE
where (${this._schema}."myData"."firstName" = ${this._schema}."yourData"."lastName")}
}
}