我创建一个视图:
CREATE OR REPLACE VIEW AuthorizationTrainer AS
SELECT Person.id, Person.login as nick, Person.password as pass
FROM TABLE2,Person
WHERE TABLE2.id_Person = Person.id
然后创建赠款:
GRANT SELECT ON Teachprog.AuthorizationTrainer TO 'Trener'@'%'
SELECT id,nick FROM AuthorizationTrainer
- 作品
SELECT id,nick,pass FROM AuthorizationTrainer
- 产生错误:
fly 错误:#1356 - 视图
'Teachprog.AuthorizationTrainer'
引用无效的表或列或函数或视图的定义者/调用者缺乏使用它们的权限