如何别名表名?

问题描述

我正在使用 PostGresql as database我有 tables in pgAdmin

我想将 alias 设置为表 myData。我曾尝试使用 ASALIAS,但没有任何效果

这是我的课

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")}
 }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)