/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES="ON" */; CREATE DATABASE `cs` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `cs`; CREATE TABLE `b_sale` ( `BackSale_ID` double NOT NULL AUTO_INCREMENT, `Product_ID` varchar(50) NOT NULL DEFAULT "", `ProductName` varchar(20) NOT NULL DEFAULT "", `Number` decimal(18,0) NOT NULL DEFAULT "0", `Price` decimal(18,2) NOT NULL DEFAULT "0.00", `JtDate` varchar(30) NOT NULL DEFAULT "", `SuperMarket` varchar(16) NOT NULL DEFAULT "", `NextBack` char(1) NOT NULL DEFAULT "", `reason` varchar(250) DEFAULT "", PRIMARY KEY (`BackSale_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `e_stock` ( `EnterStock_ID` int(11) NOT NULL AUTO_INCREMENT, `MerNumber` varchar(30) NOT NULL DEFAULT "", `Number` double NOT NULL DEFAULT "0", `PurchasePrice` double NOT NULL DEFAULT "0", `PutData` varchar(30) DEFAULT "", `StoreHouse_ID` varchar(20) NOT NULL DEFAULT "", `dealWithHuman` varchar(20) DEFAULT "", `downName` varchar(20) NOT NULL DEFAULT "", `inout` char(1) NOT NULL DEFAULT "", PRIMARY KEY (`EnterStock_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `goods` ( `SequenceNumber` int(11) NOT NULL, `MerchandiseNumber` varchar(20) NOT NULL DEFAULT "", `TreatyCode` varchar(20) NOT NULL DEFAULT "", `SortNumber` varchar(20) DEFAULT "", `MerchandiseName` varchar(50) NOT NULL DEFAULT "", `RetailPrice` decimal(18,2) DEFAULT "0.00", `Units` varchar(20) NOT NULL DEFAULT "", `PurchasePrice` decimal(18,0) NOT NULL DEFAULT "0", PRIMARY KEY (`MerchandiseNumber`), KEY `Auto_Increment_Key` (`SequenceNumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `merchandise` ( `SequenceNumber` int(11) NOT NULL AUTO_INCREMENT, `MerchandiseNumber` varchar(20) NOT NULL DEFAULT "", `TreatyCode` varchar(20) NOT NULL DEFAULT "", `SortNumber` varchar(20) DEFAULT "", `MerchandiseName` varchar(50) NOT NULL DEFAULT "", `RetailPrice` decimal(18,2) DEFAULT "0.00", `MerchandiseSpec` varchar(50) DEFAULT "", `Units` varchar(20) NOT NULL DEFAULT "", `PurchasePrice` decimal(18,0) NOT NULL DEFAULT "0", `CheckTerm` decimal(18,0) DEFAULT "0", `Remark` varchar(50) DEFAULT "", PRIMARY KEY (`MerchandiseNumber`), KEY `Auto_Increment_Key` (`SequenceNumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `payinfo` ( `OddNumber` int(11) NOT NULL AUTO_INCREMENT, `Victualer` varchar(10) DEFAULT "", `Coin` varchar(10) NOT NULL DEFAULT "", `PaymentValues` decimal(20,2) DEFAULT NULL, `PaymentFashion` varchar(20) NOT NULL DEFAULT "", `ChequeNumber` varchar(20) DEFAULT "", `Dates` varchar(26) NOT NULL DEFAULT "", `DealWithMan` varchar(10) NOT NULL DEFAULT "", `MakeLiseMan` varchar(10) NOT NULL DEFAULT "", PRIMARY KEY (`OddNumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `sale` ( `Sale_ID` double NOT NULL AUTO_INCREMENT, `ProductID` varchar(10) NOT NULL DEFAULT "", `SaleDate` varchar(50) NOT NULL DEFAULT "", `Number` decimal(18,0) NOT NULL DEFAULT "0", `Price` decimal(18,2) NOT NULL DEFAULT "0.00", `Discount` varchar(10) NOT NULL DEFAULT "", `VIP_ID` varchar(10) DEFAULT "", `ProductName` varchar(50) NOT NULL DEFAULT "", PRIMARY KEY (`Sale_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `sort` ( `SortID` int(11) NOT NULL AUTO_INCREMENT, `SortNumber` varchar(20) NOT NULL DEFAULT "", `SortName` varchar(20) NOT NULL DEFAULT "", PRIMARY KEY (`SortNumber`), KEY `Auto_Increment_Key` (`SortID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `stock` ( `id` int(11) NOT NULL AUTO_INCREMENT, `MerchandiseNumber` varchar(50) NOT NULL DEFAULT "", `MerchandiseName` varchar(50) NOT NULL DEFAULT "", `department` varchar(20) NOT NULL DEFAULT "", `number` varchar(20) DEFAULT "", `unitprice` varchar(20) DEFAULT "", `overallmoney` varchar(20) DEFAULT "", `data` varchar(26) NOT NULL DEFAULT "(0)", `paymentdate` varchar(10) DEFAULT "", `remark` varchar(50) DEFAULT "", PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `stockpile` ( `ID` double NOT NULL AUTO_INCREMENT, `MerchandiseNumber` varchar(20) NOT NULL DEFAULT "", `number` double DEFAULT "0", KEY `Auto_Increment_Key` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `user` ( `CardId` varchar(20) NOT NULL DEFAULT "", `UserName` varchar(20) NOT NULL DEFAULT "", `IDcard` varchar(20) NOT NULL DEFAULT "", `Password` varchar(20) NOT NULL DEFAULT "", `CardDate` varchar(30) DEFAULT "", `UserGrade` varchar(16) DEFAULT "", `term` char(10) DEFAULT "", `integral` char(10) NOT NULL DEFAULT "", `agio` char(10) NOT NULL DEFAULT "", `remark` varchar(50) DEFAULT NULL, PRIMARY KEY (`CardId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `user` VALUES ("1001","admin","1111","admin","2010-11-07 10:44:06","管理员","无限","22","11",""); INSERT INTO `user` VALUES ("2001","001","001","000000","20090228","普通会员","2年","0","23",NULL); INSERT INTO `user` VALUES ("3001","user","0000","user","20090228","收银员","111年","11","33",NULL); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
在Mysql Workbench上这些语句无法执行不知道为什么
解决方案
2
哪一句不能执行?错误提示是什么?
2
MySQL 5.7.10已试验,没有任何问题。请明确贴出你的错误。
16
应该是的。错误显示重复库。
Can”t create database “cs”; database exists 0.016 sec
Can”t create database “cs”; database exists 0.016 sec