使用以下位置进行选择语句时,HSQLDB用户缺少特权或找不到对象错误 [英] HSQLDB user lacks privilege or object not found error when making select statements with where

查看:213
本文介绍了使用以下位置进行选择语句时,HSQLDB用户缺少特权或找不到对象错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将SQuirrel SQL Client版本3.5.3和HSQLDB用于我的数据库.我已经能够为其指定相应的驱动程序(内存中)并创建别名.

I use SQuirrel SQL Client Version 3.5.3 and HSQLDB for my database. I have been able to specify the corresponding driver (In-memory) to it and create an Alias.

我已经创建了一张桌子

CREATE TABLE ENTRY(
NAME VARCHAR(100) NOT NULL,
DESC VARCHAR(500) NOT NULL,
PRIMARY KEY (NAME))

,并在其中添加了几行数据.而像这样的语句起作用:

and added a few lines of data into it. While statements like these work:

select * from ENTRY
select NAME from ENTRY
select DESC from ENTRY

我总是得到Error: user lacks privilege or object not found" 当在我的语句中添加where子句时,例如select DESC from ENTRY where NAME=CAR

I always get Error: user lacks privilege or object not found" when adding a where clause to my statement, e.g. select DESC from ENTRY where NAME=CAR

任何帮助都将不胜感激,因为我可以逐渐感觉到自己的理智减弱

Any help is greatly appreciated as I can slowly feel my sanity waning

推荐答案

我遇到了同样的问题,但是我的表名和其他内容都还可以,除了我对VARCHAR的查询位于双引号(")内,但它应该用单引号('')

I had the same problem, but my table name and other things were ok except my query for VARCHAR were inside double quotes("") but it should be in single quotes('')

示例:
假设您具有这样的表,其flightId为主键

example:
assume you have table like this which flightId is primary key

现在此查询是错误的:

SELECT * FROM flights WHERE flightId="0f3ae9b3-6bb1-4c95-9394-6179555f5879"

这没关系的时候

SELECT * FROM flights WHERE flightId='0f3ae9b3-6bb1-4c95-9394-6179555f5879'

这篇关于使用以下位置进行选择语句时,HSQLDB用户缺少特权或找不到对象错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆