随笔分类 -  mysql数据库

摘要:1 package com.dao.db; 2 3 import java.sql.Connection; 4 import java.sql.SQLException; 5 6 /** 7 * 数据库连接层MYSQL 8 * @author Administrator 9 *10 */11 public class DBConnection {12 13 14 /**15 * 连接数据库16 * @return17 */18 public static Connection getDBConnection()19 ... 阅读全文
posted @ 2013-11-01 13:13 聊聊IT那些事 阅读(4583) 评论(0) 推荐(1)
摘要:1.创建函数 mysql>delimiter // mysql>create function 函数名(参数1 参数1类型,...) returns 返回类型 >begin >return 返回值; >end >// mysql>select 函数名(参数1, 参数2, 。。。); >// 创建存数过程 建表create table user(id mediumint(8) unsigned not null auto_increment,name char(15) not null default "",pass char( 阅读全文
posted @ 2013-05-28 20:08 聊聊IT那些事 阅读(5040) 评论(0) 推荐(0)