摘要:MEDIUMINT带符号的范围是-8388608到8388607,无符号的范围是0到16777215,使用3个字节。一般情况下推荐使用unsigned (无符号,即只接受正整数)
        
阅读全文
 
        
            
            
摘要:目前只能在replace into 之后,重新查询数据
        
阅读全文
 
        
            
            
摘要:mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax ...
        
阅读全文
 
        
            
            
摘要:--建一个序列create sequence id_seq increment 1 minvalue 1 maxvalue 9223372036854775807cache 1;--缓存是1,每次增加1select setval('id_seq',1);--从1开始--建表create table buyers(id int not null primary key default nextval('id_seq'),name varchar(30))
        
阅读全文
 
        
            
            
摘要:Java开发Postgresql 数据库兼容应用的问题,与Oracle有一些不同:Java类型映射数据库类型的不同,Oracle jdbc驱动程序处理Java String类型可正常映射到数据库的Numberic(Integer),而Postgres则会出错。另外,则是使用hibernate时经常的錯誤: operator不存在:character varying = bytea问题,不要被这个描述误导了,并不是sql语句中character varying = bytea类型的比较,而是当使用hibernate使用参数绑定,而参数的值为null时,hibernate或者Postgresql驱
        
阅读全文
 
        
            
            
摘要:SQLMap文件中的注释格式为<!-- 注释 -->注意:注释内容的前后要加空格,否则在解析SQLMap文件时会报错(个人认为是ibatis的bug)
        
阅读全文