我比java開發人員更多的是java。我已經看着SO這一點,但由於某種原因,WHERE條件SQL插入到ColX表1從表2中選擇ColY其中Table1.colA = Table2.ColB
在PostgreSQL,下面的語法不正確,無法找到類似的問題
INSERT INTO contentelementtypeprogressortype (contentelementtypeclassname)
SELECT contentelementtypename FROM contentelementtype
WHERE
contentelementtype.id=contentelementtypeprogressortype.contentelementtypeid
的錯誤是:
ERROR: invalid reference to FROM-clause entry for table "contentelementtypeprogressortype" LINE 2: ...OM contentelementtype where contentelementtype.id=contentele... ^ HINT: There is an entry for table "contentelementtypeprogressortype", but it cannot be referenced from this part of the query. ********** Error **********
ERROR: invalid reference to FROM-clause entry for table "contentelementtypeprogressortype" SQL state: 42P01 Hint: There is an entry for table "contentelementtypeprogressortype", but it cannot be referenced from this part of the query. Character: 159
愚蠢的我!我會關閉之前,我失去了代表 – Jake
感謝一百萬 – Jake