【SQL开源代码栏目提醒】:网学会员为需要SQL开源代码的朋友们搜集整理了gold.sql相关资料,希望对各位网友有所帮助!
-- MySQL dump 10.9
--
-- Host: localhost Database: gold
-- ------------------------------------------------------
-- Server version 4.1.8-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
--
-- Table structure for table `board`
--
DROP TABLE IF EXISTS `board`;
CREATE TABLE `board` (
`board_num` int(11) NOT NULL auto_increment,
`board_nickname` char(20) NOT NULL default '',
`board_title` char(60) NOT NULL default '',
`board_contant` char(255) NOT NULL default '',
`board_time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`board_num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `board`
--
/*!40000 ALTER TABLE `board` DISABLE KEYS */;
LOCK TABLES `board` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `board` ENABLE KEYS */;
--
-- Table structure for table `bulletins`
--
DROP TABLE IF EXISTS `bulletins`;
CREATE TABLE `bulletins` (
`bulletins_num` int(11) NOT NULL auto_increment,
`bulletins_date` datetime NOT NULL default '0000-00-00 00:00:00',
`bulletins_title` char(50) NOT NULL default '',
`bulletins_content` char(255) NOT NULL default '',
PRIMARY KEY (`bulletins_num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bulletins`
--
/*!40000 ALTER TABLE `bulletins` DISABLE KEYS */;
LOCK TABLES `bulletins` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `bulletins` ENABLE KEYS */;
--
-- Table structure for table `item`
--
DROP TABLE IF EXISTS `item`;
CREATE TABLE `item` (
`item_num` int(11) NOT NULL default '0',
`order_num` int(11) NOT NULL default '0',
`product_num` char(10) NOT NULL default '',
`item_quantity` int(5) NOT NULL default '0',
`item_total` float NOT NULL default '0',
PRIMARY KEY (`item_num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `item`
--
/*!40000 ALTER TABLE `item` DISABLE KEYS */;
LOCK TABLES `item` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `item` ENABLE KEYS */;
--
-- Table structure for table `orders`
--
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`order_num` int(11) NOT NULL auto_increment,
`order_date` date NOT NULL default '0000-00-00',
`order_deliver_date` date NOT NULL default '0000-00-00',
`order_deliver_add` char(100) NOT NULL default '',
`order_receiver` char(20) NOT NULL default '',
`order_card` char(255) NOT NULL default '',
`order_status` char(255) NOT NULL default '',
`order_pay` float NOT NULL default '0',
`user_id` char(12) NOT NULL default '',
PRIMARY KEY (`order_num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `orders`
--
/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
LOCK TABLES `orders` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
--
-- Table structure for table `product`
--
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`product_num` char(10) NOT NULL default '',
`product_name` char(30) NOT NULL default '',
`product_price` float NOT NULL default '0',
`product_discount` float NOT NULL default '0',
`product_pic` char(255) NOT NULL default '',
PRIMARY KEY (`product_num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `product`
--
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
LOCK TABLES `product` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
--
-- Table structure for table `userdata`
--
DROP TABLE IF EXISTS `userdata`;
CREATE TABLE `userdata` (
`user_id` char(12) NOT NULL default '',
`user_pw` char(10) NOT NULL default '',
`user_name` char(10) NOT NULL default '',
`user_name2` char(10) NOT NULL default '',
`user_sex` enum('F','M') NOT NULL default 'F',
`user_year` char(4) NOT NULL default '',
`user_month` char(2) NOT NULL default '',
`user_day` char(2) NOT NULL default '',
`user_mail` char(25) NOT NULL default '',
`user_tel` char(20) NOT NULL default '',
`user_mobile` char(20) default NULL,
`user_fax` char(20) default NULL,
`user_addr` char(20) NOT NULL default '',
`user_level` enum('1','2') NOT NULL default '1',
PRIMARY KEY (`user_id`)
) ENGINE=