56,687
社区成员
发帖
与我相关
我的任务
分享
CREATE TABLE `TAppointMst` (
`AppId` int(11) NOT NULL AUTO_INCREMENT,
`AcceptId` int(11) DEFAULT NULL,
`DayRootId` int(11) DEFAULT NULL,
`BookId` int(11) DEFAULT '0',
`WorkUserId` int(11) DEFAULT '0',
`AppDate` date DEFAULT NULL,
`FromTime` varchar(4) DEFAULT NULL,
`ToTime` varchar(4) DEFAULT NULL,
`FreeTime` int(11) DEFAULT '0',
`DisPlayIndex` int(11) DEFAULT NULL,
`DisPlayEndIndex` int(11) DEFAULT NULL,
`DisPlayLineSpan` varchar(50) DEFAULT NULL,
`MemberCnt` int(11) DEFAULT '0',
`CarType` int(1) DEFAULT '0',
`AppIntentionId` int(3) DEFAULT '0',
`AppResutId` int(3) DEFAULT '0',
`Sales` decimal(10,0) DEFAULT NULL,
`CardSales` decimal(10,0) DEFAULT NULL,
`FirstMenoy` decimal(10,0) DEFAULT NULL,
`LeavMenoy` decimal(10,0) DEFAULT NULL,
`LeavMenoyDate` date DEFAULT NULL,
`Comment` text,
`Comment2` text,
`Comment3` text,
`ReportUser` text,
`OverHour` varchar(2) DEFAULT NULL,
`OverMinute` varchar(2) DEFAULT NULL,
`Status` int(1) DEFAULT '0',
`HelpAppId` int(11) DEFAULT '0',
`ConfirmUserId` int(11) DEFAULT NULL,
`ParentAppId` int(11) DEFAULT '0',
`ChildAppId` int(11) DEFAULT '0',
`ParentPlanDate` date DEFAULT NULL,
`ChildPlanDate` date DEFAULT NULL,
`Yobi1` int(11) DEFAULT '0',
`Yobi2` int(11) DEFAULT '0',
`Yobi3` int(11) DEFAULT '0',
`Yobi4` int(11) DEFAULT '0',
`Yobi5` int(11) DEFAULT '0',
`Yobi6` varchar(50) DEFAULT NULL,
`Yobi7` varchar(50) DEFAULT NULL,
`Yobi8` varchar(50) DEFAULT NULL,
`Yobi9` varchar(50) DEFAULT NULL,
`Yobi10` varchar(50) DEFAULT NULL,
`Yobi11` date DEFAULT NULL,
`Yobi12` date DEFAULT NULL,
`Yobi13` datetime DEFAULT NULL,
`InsertDate` datetime NOT NULL,
`SakuseiSyaId` int(11) NOT NULL,
`UpdateDate` datetime NOT NULL,
`UpdateUserId` int(11) NOT NULL,
PRIMARY KEY (`AppId`),
KEY `AcceptId` (`AcceptId`),
KEY `DayRootId` (`DayRootId`),
KEY `AppDate` (`AppDate`),
KEY `WorkUserId` (`WorkUserId`),
KEY `BookId` (`BookId`)
) ENGINE=InnoDB AUTO_INCREMENT=84191 DEFAULT CHARSET=utf8;
CREATE TABLE `TAppointMst` (
`AppId` int(11) NOT NULL AUTO_INCREMENT,
`AcceptId` int(11) DEFAULT NULL,
`DayRootId` int(11) DEFAULT NULL,
`BookId` int(11) DEFAULT '0',
`WorkUserId` int(11) DEFAULT '0',
`AppDate` date DEFAULT NULL,
`FromTime` varchar(4) DEFAULT NULL,
`ToTime` varchar(4) DEFAULT NULL,
`FreeTime` int(11) DEFAULT '0',
`DisPlayIndex` int(11) DEFAULT NULL,
`DisPlayEndIndex` int(11) DEFAULT NULL,
`DisPlayLineSpan` varchar(50) DEFAULT NULL,
`MemberCnt` int(11) DEFAULT '0',
`CarType` int(1) DEFAULT '0',
`AppIntentionId` int(3) DEFAULT '0',
`AppResutId` int(3) DEFAULT '0',
`Sales` decimal(10,0) DEFAULT NULL,
`CardSales` decimal(10,0) DEFAULT NULL,
`FirstMenoy` decimal(10,0) DEFAULT NULL,
`LeavMenoy` decimal(10,0) DEFAULT NULL,
`LeavMenoyDate` date DEFAULT NULL,
`Comment` text,
`Comment2` text,
`Comment3` text,
`ReportUser` text,
`OverHour` varchar(2) DEFAULT NULL,
`OverMinute` varchar(2) DEFAULT NULL,
`Status` int(1) DEFAULT '0',
`HelpAppId` int(11) DEFAULT '0',
`ConfirmUserId` int(11) DEFAULT NULL,
`ParentAppId` int(11) DEFAULT '0',
`ChildAppId` int(11) DEFAULT '0',
`ParentPlanDate` date DEFAULT NULL,
`ChildPlanDate` date DEFAULT NULL,
`Yobi1` int(11) DEFAULT '0',
`Yobi2` int(11) DEFAULT '0',
`Yobi3` int(11) DEFAULT '0',
`Yobi4` int(11) DEFAULT '0',
`Yobi5` int(11) DEFAULT '0',
`Yobi6` varchar(50) DEFAULT NULL,
`Yobi7` varchar(50) DEFAULT NULL,
`Yobi8` varchar(50) DEFAULT NULL,
`Yobi9` varchar(50) DEFAULT NULL,
`Yobi10` varchar(50) DEFAULT NULL,
`Yobi11` date DEFAULT NULL,
`Yobi12` date DEFAULT NULL,
`Yobi13` datetime DEFAULT NULL,
`InsertDate` datetime NOT NULL,
`SakuseiSyaId` int(11) NOT NULL,
`UpdateDate` datetime NOT NULL,
`UpdateUserId` int(11) NOT NULL,
PRIMARY KEY (`AppId`)
) ENGINE=InnoDB AUTO_INCREMENT=308 DEFAULT CHARSET=utf8;
show INDEX FROM TAppointMst
table Non_unique Key_name Seq_in_index Column_name collation Cardinality NULL Index_type
TAppointMst 0 PRIMARY 1 AppId A 84568 BTREE
TAppointMst 1 AcceptId 1 AcceptId A 84568 YES BTREE
TAppointMst 1 DayRootId 1 DayRootId A 28189 YES BTREE
TAppointMst 1 AppDate 1 AppDate A 355 YES BTREE
TAppointMst 1 WorkUserId 1 WorkUserId A 93 YES BTREE
TAppointMst 1 BookId 1 BookId A 84568 YES BTREE
EXPLAIN
SELECT * from
TAppointMst
where
AppDate BETWEEN '2012-01-01' and '2012-01-31'
id select_type table type possible_keys rows Extra
1 SIMPLE TAppointMst ALL AppDate 85315 Using where