MySQL
孙行者悟空
学无止境...
展开
-
java.sql.SQLException:Value '0000-00-00' can not be represented as java.sql.Date
问题描述:数据表中有记录的time字段(属性为timestamp)其值为:“0000-00-00 00:00:00”程序使用select 语句从中取数据时出现以下异常:java.sql.SQLException:Value '0000-00-00' can not be represented as java.sql.Date后查资料发现 “0000-00-00 0转载 2015-05-15 09:46:08 · 680 阅读 · 0 评论 -
php+mysql中迅速插入百万条测试数据的方法(12s)
1.php代码<?php $t=mktime(); set_time_limit(1000); $myFile="c:/insert.sql"; $fhandler=fopen($myFile,'wb'); if($fhandler){ $i=0; while($i<1000000)//1,0000,000 { $i++; $sql="$i\t'bb'"; fwrite原创 2015-03-23 22:29:05 · 7421 阅读 · 0 评论 -
MySQL函数用法
if elseselect case when state='1' then 'ok' when '2' then 'yes' else '' end原创 2014-10-22 11:48:55 · 520 阅读 · 0 评论