会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
北方的老狼
博客园
首页
新随笔
联系
订阅
管理
2017年10月18日
模糊查询
摘要: 在使用PreparedStatement进行模糊查询的时候废了一番周折,以前一直都没有注意这个问题。一般情况下我们进行精确查询,sql语句类似:select * from table where name =?,然后调用PreparedStatement的setString等方法给?指定值。那么模糊
阅读全文
posted @ 2017-10-18 16:20 北方的老狼
阅读(162)
评论(0)
推荐(0)
2017年10月16日
EJB,分布式
摘要: EJB
阅读全文
posted @ 2017-10-16 15:00 北方的老狼
阅读(132)
评论(0)
推荐(0)
jdbc-transaction
摘要: public static void main(String[] args) { Connection conn=null; Statement stmt=null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); conn=Drive
阅读全文
posted @ 2017-10-16 14:42 北方的老狼
阅读(153)
评论(0)
推荐(0)
mysql数据类型,注释,分页,多表连接子查询
摘要: 数值:int,double 字符:varchar,char 时间:datetime 注释: 1.-- 2.# 3./*.....*/
阅读全文
posted @ 2017-10-16 11:08 北方的老狼
阅读(180)
评论(0)
推荐(0)
2017年10月15日
MyEclipse开发Java WebService 简单实例
摘要: 一、准备工作(以下为本实例使用工具) 1、MyEclipse10.7.1 2、JDK 1.6.0_22 二、创建服务端 1、创建【Web Service Project】,命名为【TheService】。 2、创建【Class】类,命名为【ServiceHello】,位于【com.hyan.serv
阅读全文
posted @ 2017-10-15 11:10 北方的老狼
阅读(256)
评论(0)
推荐(0)
MySQL创建表时,设置时间字段自动插入当前时间的两种格式
摘要: 1.timestamp类型 create table manager( id int not null primary key, mdate timestamp not null default current_timestamp ); 2.datetime类型 create table manag
阅读全文
posted @ 2017-10-15 11:01 北方的老狼
阅读(16278)
评论(1)
推荐(0)
sql语句中where 1=1和1=0的作用
摘要: 一、不用where 1=1 在多条件查询中的困扰 举个例子,如果您做查询页面,并且,可查询的选项有多个,同时,还让用户自行选择并输入查询关键词,那么,按平时的查询语句的动态构造,代码大体如下: ①种假设 如果上述的两个IF判断语句,均为True,即用户都输入了查询词,那么,最终的MySqlStr动态
阅读全文
posted @ 2017-10-15 10:55 北方的老狼
阅读(2405)
评论(0)
推荐(1)
Mysql中的Datetime和Timestamp比较
摘要: mysql中用于表示时间的三种类型date, datetime, timestamp (如果算上int的话,四种) 比较容易混淆,下面就比较一下这三种类型的异同 相同点 都可以用于表示时间都呈字符串显示 不同点 1.顾名思义,date只表示'YYYY-MM-DD'形式的日期,datetime表示'Y
阅读全文
posted @ 2017-10-15 10:52 北方的老狼
阅读(2042)
评论(0)
推荐(0)
公告