/*以下代码是对emp表进行显示宽度设置 */col empno for 9999;col ename for a10;col job for a10;col mgr for 9999;col hiredate for a12;col sal for 9999;col comm for 9999;col deptno for 99;col tname for a12;set pagesize 50; //----------------------------------------------
public class DBCon { // 数据库驱动对象 public static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; // 数据库连接地址(数据库名) public static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl"; // 登陆名 public static final String USER =
public class Test{public static void main (String args []){ java.util.Date a = new java.util.Date();System.out.println(a);java.sql.Date b = new java.sql.Date(a.getTime());System.out.println(b);java.sql.Time c = new java.sql.Time(a.getTime());System.o
Java自己动手写连接池三,核心代码; package com.kama.cn; import java.sql.Connection;import java.util.ArrayList;import java.util.List; public class ConnectionPool { //数据库连接 private static ConnectionPool connectionPool=new ConnectionPool(); public List<Connection> po