摘录自:http://blog.csdn.net/shuaiwang/article/details/1807421

在PostgreSQL中,不论是在pgAdmin中还是在命令行控制台里面,在SQL语句中表示属性值的总会遇到ERROR: column "..." does not exist这样的错误,比如下面的语句:

 INSERT INTO user (user_id, user_name)
 VALUES (1, "Smart");  ---> 这里

会有如下出错信息:

LOG:  statement: insert into user (user_id, user_name)
values (1, "NewUser");

ERROR: column "NewUser" does not exist
SQL 状态: 42703
字符:57

试验几次,发现这里改成单引号就可以了~~

    INSERT INTO user (user_id, user_name)
    VALUES (1, 'Smart');  ---> 这里

就可以成功插入了~ 想了想,原因可能是被双引号括起来的,PostgreSQL都会认为是“名称”,如表名,字段名等~ 而被单引号括起来的就表示值了~

PostgreSql问题:ERROR: column "1" does not exist的更多相关文章

  1. navicat连接PostgreSQL报:column “rolcatupdate” does not exist ...错误的解决办法

    avicat premium 连接PostgreSQL出现: column “rolcatupdate” does not exist ... 错误如图: 解决方案: 看看你的navicat 是否为最 ...

  2. ERROR: column "xxxxxx" does not exist解决办法

    今天在写PostgreSQL语句时候发现运行这个代码 SELECT t1.equipid, t2.equipname, t1.bigtype, t1.smalltype FROM pdw_gh_pro ...

  3. PostgreSQL 遇到 column "value" does not exist

    初次使用PostgreSQL,在执行插入语句的时候死活插入不进去数据 INSERT INTO pre_trait ( archive_id, apply_from, owner_area_code ) ...

  4. 【hibernate postgresql】注解@TypeDef/@Enumerated/数据库字段gender为枚举类型,从前台接受到实体后进行保存报错:org.postgresql.util.PSQLException: ERROR: column "gender" is of type gender but expression is of type character varying

    数据库字段gender为枚举类型,从前台接受到实体后进行保存报错:org.postgresql.util.PSQLException: ERROR: column "gender" ...

  5. ERROR: type "sum" does not exist

    开发问pg中执行一个简单的语句,多次报错: > ERROR: type "sum" does not exist LINE 1: SELECT SUM ^ 看看具体的语句,其 ...

  6. [转载]Vertica “ERROR: Too many ROS containers exist”

    最近在用Vertica的时候碰到一个问题,Vertica在运行了一段时间后总是出现类似下面的错误 1: java.sql.SQLException: [Vertica][VJDBC](5065) 2: ...

  7. pgsql 执行建库脚本时候出现ERROR: relation "xxx_id_seq" does not exist

    1. 问题: ERROR: relation "xxx_id_seq" does not exist 2. 出现原因:由于表中建立了自增字段,id定义为Serial 类型,当执行完 ...

  8. [PAClient Error] Error: E4356 File does not exist armv7

    [PAClient Error] Error: E4356 File does not exist: /Users/tt/PAServer/scratch-dir/Administrator-snIO ...

  9. when create a table,then show error ora-00952 tablespace tsb_1 not exist

    QUESTION:When create a table,then show error ora-00952 tablespace tsb_1 not exist. STEP: 1.select us ...

随机推荐

  1. Windows 7样式地址栏(Address Bar)控件实现

    介绍 从Vista开始,地址栏就有了很大的改变,不知道大家有什么感觉,笔者觉得很方便,同时又兼容之前的功能,是个很不错的创新.不过,微软并不打算把这一很酷的功能提供给广大的开发人员. 本文提供了一个简 ...

  2. XUL透明异形旋转窗体

    200行不到的代码,实现透明异形旋转窗体. 下载(25MB): http://oltag.com:8080/yaolixing/18/11/00/OHUIv52.0.1_3_webTrans20180 ...

  3. Python day02 三元运算

     type  查看数据类型.2 **32  :2的32次方 .浮点的表示类型是小数,但是小数不仅仅包括浮点 浮点数用来处理实数,即带有小数的数字 三元运算:  result = 值1 if 条件 el ...

  4. partition length exceeds the loop-partition-table-imposed maximum of 4294967295

    问题: 当大于2T的磁盘,在用parted操作的时候,会出现这样的报错,原因是因为现在的分区表是mbr,需要修改为gpt.mbr最大支持2T的空间. 解决方法: 搞清楚问题,解决方法也很简单:mkla ...

  5. jQuery 文档操作方法 (四)

    方法 描述 addClass() 向匹配的元素添加指定的类名. after() 在匹配的元素之后插入内容. append() 向匹配元素集合中的每个元素结尾插入由参数指定的内容. appendTo() ...

  6. 关于php变量的赋值和引用的区别

    刚开始学习php,发现有些地方和js语法不同,所以记录下来. 这篇文章是总结php中变量赋值和引用的区别. 我们知道,js中,原始类型的赋值,是将值直接复制给变量:引用类型的赋值,是将内存地址复制给变 ...

  7. WKWebView强大的新特性

    iOS11对WKWebView的功能进一步完善,新增如下功能: Manager Cookies Fileter unwanted content Provide custom resources 下面 ...

  8. Java学习笔记16(面向对象九:补充内容)

    总是看到四种权限,这里做一个介绍: 最大权限是public,后面依次是protected,default,private private修饰的只在本类可以使用 public是最大权限,可以跨包使用,不 ...

  9. Git-分布式版本控制系统(二)

    工作区(Woring directory ) 版本区(repository,即隐藏的.git文件) Git的版本库里存了很多东西,其中最重要的就是称为stage(或者叫index)的暂存区,还有Git ...

  10. JSP动态产生的代码,点击显示确认操作,根据操作跳转并传值。

    假如有如下一段代码产生了多个选项我们改如何获得点击删除一项中的值? <%List<Theme> themelist=(List<Theme>)request.getAtt ...