我已經創建了一個SQL查詢視圖:錯誤而顯示查看SQL
CREATE VIEW rightview
AS
SELECT data.accounts.login,data.accounts.password,data.customers.right_
FROM data.accounts join data.customers using (id);
當我cliick上執行查詢,則表明視圖創建成功。但是,當我嘗試這個查詢
select * from data.rightview;
,以顯示其列,我得到這個錯誤:
Error code 1356, SQL state HY000: View 'data.rightview' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
像消息一樣,您試圖引用不存在的表或列。仔細檢查名稱是否正確。嘗試在創建視圖之前執行SELECT查詢 –