摘要: package test;import java.sql.*;import java.util.Scanner;public class testSql002_StudentTest { /** * 获得数据库连接的 * @return 数据库连接对象 * @throws Exception */ static Scanner input = new Scanner(System.in); public static Connection getCon() throws Exception{ String qudong = "com.mysql.jdbc.Driver"; 阅读全文
posted @ 2013-06-18 16:10 一个学渣 阅读(292) 评论(0) 推荐(0) 编辑
摘要: -- 创建数据库CREATE DATABASE book;-- 创建作者表CREATE TABLE authors(Id int not NULL, -- 作者编号Fname VARCHAR(10), -- 姓Lname VARCHAR(12), -- 名Sex CHAR(2), Sage int );-- 创建图书表CREATE table titles(tId int not NULL , -- 图书编号tname VARCHAR(25) , -- 书名type VARCHAR(25),price int );-- 添加数据INSERT authors VALUES (001,'毛 阅读全文
posted @ 2013-06-18 13:16 一个学渣 阅读(531) 评论(0) 推荐(0) 编辑

 

CSDNGitHub 联系邮箱:aikongmeng@gmail.com


Copyright 2008-2019 Government All Rights Reserved