<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>椰子Java</title> 
<link>http:///index.php</link> 
<description>       我从事软件行业已经9年啦，2001毕业以后一直在成都从事软件开发工作，从事过电信行业相关软件开发和航空行业相关软件开发工作，2007回到了海南，回到了我的故乡。                                                                                                                                我经历了喜欢--狂热--疲倦--坚持--深爱上我的行业，因为它最体现我的价值。我对它了解越深就越能感觉到它的奇妙性，我可以在它虚拟出来的世界里任意翱翔。。。</description> 
<language>zh-cn</language> 
<copyright>Powered by Bo-blog 2.0.2 sp1</copyright>
<item>
<link>http:///read.php?596</link>
<title>mysql几个非常基础的函数练习总结。</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Mon, 03 Sep 2007 15:34:28 +0000</pubDate> 
<guid>http:///read.php?596</guid> 
<description>
<![CDATA[ 
	知识要常拿出来晒晒！<br/><br/>Version()取得当前版本<br/>user()取得当前用户<br/>now()取得当前时间<br/>CURRENT_DATE是系统日期，不包含时间。<br/><br/>例如：<br/><br/>mysql> select version(),user(),now(),current_date;<br/>+---------------------+----------------+---------------------+--------------+<br/>&#124; version() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124; user() &nbsp; &nbsp; &nbsp; &nbsp; &#124; now() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124; current_date &#124;<br/>+---------------------+----------------+---------------------+--------------+<br/>&#124; 5.0.41-community-nt &#124; root@localhost &#124; 2007-09-03 23:42:02 &#124; 2007-09-03 &nbsp; &#124;<br/>+---------------------+----------------+---------------------+--------------+<br/>1 row in set (0.00 sec)
  ]]> 
</description>
</item><item>
<link>http:///read.php?500</link>
<title>Mysql专用数据库设计工具：DBDesigner4.0.5.6下载</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Tue, 26 Jun 2007 15:44:54 +0000</pubDate> 
<guid>http:///read.php?500</guid> 
<description>
<![CDATA[ 
	<a href="http:///attachment/1182876602_0.jpg" target="_blank"><img src="http:///attachment/1182876602_0.jpg" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>这个文件只能在登入之后下载。请先 <a href="login.php?job=register">注册</a> 或 <a href="login.php">登入</a><br/><br/>
  ]]> 
</description>
</item><item>
<link>http:///read.php?312</link>
<title>总结mysql取得系统时间的功能</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Mon, 22 Jan 2007 08:47:56 +0000</pubDate> 
<guid>http:///read.php?312</guid> 
<description>
<![CDATA[ 
	在Oracle中系统时间为sysdate，在mysql中呢？<br/>以下是我总结mysql取得系统时间的功能。<br/>select now() as Systime;<br/>select current_date as Systime;<br/>select sysdate() as Systime;
  ]]> 
</description>
</item><item>
<link>http:///read.php?267</link>
<title>在Mysql将数据备份到文件中的命令</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Thu, 30 Nov 2006 09:29:10 +0000</pubDate> 
<guid>http:///read.php?267</guid> 
<description>
<![CDATA[ 
	SELECT CDName, InStock, Category INTO OUTFILE 'Backup.sql'<br/> &nbsp; FIELDS<br/> &nbsp; &nbsp; &nbsp;TERMINATED BY ','<br/> &nbsp; &nbsp; &nbsp;ENCLOSED BY '"'<br/>FROM CDs WHERE Category='Country';<br/><br/>以上命令将在Mysql运行目录里的Date目录里，相应的数据库目录，这个例子是test目录里，生成'Backup.sql'文件。
  ]]> 
</description>
</item><item>
<link>http:///read.php?261</link>
<title>Mysql四个加密函数</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Sun, 26 Nov 2006 12:37:44 +0000</pubDate> 
<guid>http:///read.php?261</guid> 
<description>
<![CDATA[ 
	Mysql一共采用四中加密方法，这些都是单向的加密方法。<br/>这里特别提示：MD5已经不再安全，我国的研究研究员已经成功破解这个加密方法。<br/><br/>四种加密函数分别是：<br/><br/> &nbsp; 1：insert into test2 (id,test)values('1',MD5('pa55word'));<br/> &nbsp; &nbsp; 2：insert into test2 (id,test)values('2',ENCRYPT('pa55word')); <br/> &nbsp; &nbsp; 3：insert into test2 (id,test)values('3',PASSWORD('pa55word'));<br/> &nbsp; &nbsp; 4：insert into test2 (id,test)values('3',SHA1('pa55word'));
  ]]> 
</description>
</item><item>
<link>http:///read.php?241</link>
<title>Mysql的rollback</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Thu, 09 Nov 2006 09:35:42 +0000</pubDate> 
<guid>http:///read.php?241</guid> 
<description>
<![CDATA[ 
	我写这个是因为今天和别人交流的时候，有很多人对mysql太不了解了，他认为rollback功能都没有，是一个没有用的数据库，其实我本人认为只要业务小，就没有必要使用oracle更不应该使用Sql2000<br/><br/>注意这个实验只能在sql终端做，因为很多软件都是自动提交的。<br/><br/>Drop table Student;<br/><br/>CREATE TABLE Student (<br/> &nbsp; StudentID INT NOT NULL PRIMARY KEY,<br/> &nbsp; Name &nbsp; &nbsp; &nbsp;VARCHAR(50) NOT NULL<br/>)TYPE = InnoDB;<br/><br/><br/>INSERT INTO Student (StudentID,Name) VALUES (1,'JJ Smith');<br/>INSERT INTO Student (StudentID,Name) VALUES (2,'Joe Yin');<br/>INSERT INTO Student (StudentID,Name) VALUES (3,'John Lee');<br/>INSERT INTO Student (StudentID,Name) VALUES (4,'Jacky Chen');<br/> &nbsp;<br/> &nbsp;<br/> &nbsp;<br/>BEGIN;<br/><br/>INSERT INTO Student (StudentID, Name) VALUES (98, 'Anne');<br/>INSERT INTO Student (StudentID, Name) VALUES (99, 'Julian');<br/><br/>ROLLBACK;<br/><br/>select * from Student;
  ]]> 
</description>
</item><item>
<link>http:///read.php?162</link>
<title>把mysql备份到文件中</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Mon, 11 Sep 2006 15:36:55 +0000</pubDate> 
<guid>http:///read.php?162</guid> 
<description>
<![CDATA[ 
	try { <br/>// Create the statement <br/>Statement stmt = connection.createStatement(); <br/><br/>// Export the data <br/>String filename = "c:tempoutfile.txt"; <br/>String tablename = "mysql_2_table"; <br/>stmt.executeUpdate("SELECT * INTO OUTFILE "" + filename + "" FROM " + tablename); <br/>} catch (SQLException e) { <br/>}
  ]]> 
</description>
</item><item>
<link>http:///read.php?75</link>
<title>今天忽然想起来做一些SQL练习（Mysql练习题）2 </title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Wed, 12 Jul 2006 03:03:00 +0000</pubDate> 
<guid>http:///read.php?75</guid> 
<description>
<![CDATA[ 
	<strong>1:Where、And、OR </strong><br/> &nbsp; &nbsp; &nbsp;这三个是最常用的条件标。<br/><br/> &nbsp; SELECT * FROM Bird WHERE sex = 'f';<br/> &nbsp; SELECT * FROM Bird WHERE woner= 'fubin';<br/> &nbsp; &nbsp;SELECT * FROM Bird WHERE (species = 'Car' AND sex = 'm') OR (species = 'Bus' AND sex = 'f');<br/><br/><strong>2:Delete、Insert、Update</strong><br/><br/> &nbsp; &nbsp; 这三个就不用说了吧。这三个是除了Select以为最重要的操作了。<br/><br/> &nbsp; MySQL提供了几个语句调节符，允许调度策略：<br/><br/>　　· LOW_PRIORITY关键字应用于DELETE、INSERT、LOAD DATA、REPLACE和UPDATE。<br/>　　· HIGH_PRIORITY关键字应用于SELECT和INSERT语句。<br/>　　· DELAYED关键字应用于INSERT和REPLACE语句。<br/>　　LOW_PRIORITY和HIGH_PRIORITY调节符影响那些使用数据表锁的存储引擎（例如MyISAM和MEMORY）。DELAYED调节符作用于MyISAM和MEMORY数据表。<br/> &nbsp; &nbsp;DELETE LOW_PRIORITY FROM Orders WHERE BookID=103；<br/><br/> &nbsp; &nbsp;DELETE Orders.* FROM Books, Orders WHERE Books.BookID=Orders.BookID &nbsp;AND Books.BookName='News'; 这是删除两个表的操作。<br/><br/> &nbsp; &nbsp;INSERT INTO Professor (ProfessorID, Name) SELECT StudentID + 7, Name &nbsp;FROM Student;<br/> &nbsp; &nbsp; &nbsp;这是想Professor表数据是：StudentID + 7和Name &nbsp;FROM Student（这来自另外一个表）<br/><br/> &nbsp; UPDATE Bird SET birth = '1989-08-31' WHERE name = 'BlueBird';<br/><br/><strong>3：Case</strong><br/><br/> &nbsp; &nbsp; &nbsp;SELECT name AS Name,CASE category<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHEN "Holiday" THEN "Seasonal"<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHEN "Profession" THEN "Bi_annual"<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHEN "Literary" THEN "Random" END AS "Pattern"<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM sales;<br/> &nbsp; &nbsp; &nbsp; Case是一个非常重要的条件语句。这句是把Holiday赋Seasonal等三个。并把其结果赋名字为Pattern字段。<br/><br/><strong> &nbsp; 4：流程控制语句</strong><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; SELECT Name AS Title, StatID AS Status, RatingID AS Rating,<br/> &nbsp; &nbsp; &nbsp; &nbsp; IF(NumDisks>1, 'Check for extra disks!', 'Only 1 disk.') AS Verify<br/> &nbsp; &nbsp; &nbsp; &nbsp; FROM DVDs<br/> &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY Title;<br/> &nbsp; &nbsp; &nbsp; &nbsp; 把DVDs表DVD个数大于1的表。并把Verify大于2的设置为：Check for extra disks只有一个的设置为：Only 1 disk<br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; SELECT name AS Name, category AS Category,<br/> &nbsp; &nbsp; &nbsp; &nbsp; IF(winter>500, "Sells", "Slow") AS Trend<br/> &nbsp; &nbsp; &nbsp; &nbsp; FROM sales;也一样，就是把winter>500的设置为sells小于的设置为slow.
  ]]> 
</description>
</item><item>
<link>http:///read.php?74</link>
<title>今天忽然想起来做一些SQL练习（Mysql练习题）</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Mon, 10 Jul 2006 04:45:10 +0000</pubDate> 
<guid>http:///read.php?74</guid> 
<description>
<![CDATA[ 
	以Mysql为例<br/><br/>1：select avg(salary) AS 'Average Salary' from employee;<br/><br/>这是查询salary字段的平均数。<br/><br/>2:select &nbsp;SUM(salary) &nbsp;AS 'SUM' from employee;<br/><br/>这是查询salary字段的总数。<br/><br/>3：Aliases 别名的使用<br/><br/> &nbsp;SELECT Name AS StudentName, StudentID AS ID FROM Student;这个比较简单，实际上和<br/> &nbsp;SELECT StudentName, StudentID FROM Student; 是一样的。<br/><br/>4：Count统计<br/><br/> &nbsp; &nbsp;select COUNT(*) from employee;统计一共有多少行数据。<br/> &nbsp; &nbsp;SELECT owner, COUNT(*) FROM Bird GROUP BY owner;这样的统计的结果是，把bird表中，以owner为条件，把同一个主人，所有动物都统计数量出来。还可以实现查找各种鸟类在整个数据中的个数。<br/> &nbsp; &nbsp;select COUNT(*) from employee where title = 'Programmer';这个就是统计员工表中属于程序员的数量。<br/> &nbsp; &nbsp;<br/><br/>5：DISTINCT （不同的）<br/><br/> &nbsp; SELECT DISTINCT owner FROM Bird; 这个就是列举出bird表里所有不同的主人。<br/> &nbsp; select distinct firstname from employee;这个显示的是员工表中，不同的姓。<br/><br/>6：Group(组)<br/><br/> &nbsp; &nbsp;select * from employee GROUP by title;这个的意思是以工作内容为条件，以分组的形式显示，每个工种只显示一个。<br/><br/>7：IN(含盖)<br/><br/> &nbsp; &nbsp;SELECT name, category FROM sales WHERE category IN("Profession");字段category 含"Profession"的数据。<br/> &nbsp; SELECT * from employee where title not in("Programmer");相反，这是不包含程序员这个职位的。<br/>8：Like(类似)<br/><br/> &nbsp; &nbsp;select lastName from employee where lastName like '%a';就是姓是由a结尾的姓。
  ]]> 
</description>
</item><item>
<link>http:///read.php?1</link>
<title>Java SQL所有的操作汇总</title> 
<author>fubin &lt;yonghe169@163.com&gt;</author>
<category>By Mysql</category>
<pubDate>Mon, 26 Jun 2006 18:24:40 +0000</pubDate> 
<guid>http:///read.php?1</guid> 
<description>
<![CDATA[ 
	1: Loading a JDBC Driver 加载驱动<br/> &nbsp; 如果你使用的是IDE方式开发，那么你必须加入Loading a JDBC Driver .一般的开发工具都在配置界面。<br/>以Eclipse为例。如图，<a href="http:///attachment/1151346225.bmp" target="_blank"><img src="http:///attachment/1151346225.bmp" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/> &nbsp; 在加载外部Jar就可以把您在网络上下栽的Mysql JDBC加载进来。<br/> &nbsp; &nbsp;try {<br/> &nbsp; &nbsp; &nbsp; &nbsp;// Load the JDBC driver<br/> &nbsp; &nbsp; &nbsp; &nbsp;String driverName = "org.gjt.mm.mysql.Driver";<br/> &nbsp; &nbsp; &nbsp; &nbsp;Class.forName(driverName);<br/> &nbsp; &nbsp;} catch (ClassNotFoundException e) {<br/> &nbsp; &nbsp; &nbsp; &nbsp;// Could not find the driver<br/> &nbsp; &nbsp;}
  ]]> 
</description>
</item>
</channel>
</rss>