CREATE TABLE `query_config_brelation` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `BID` varchar(8) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `query_config_button` (
  `ID` varchar(8) NOT NULL,
  `NAME` varchar(50) default NULL,
  `ICO` varchar(50) default NULL,
  `PATHORJS` varchar(300) default NULL,
  `RUNNAME` varchar(50) default NULL,
  `ROLEIDS` varchar(100) default NULL,
  `FID` varchar(8) default NULL,
  `BCODE` varchar(4) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `query_config_connection` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `MFIELD` varchar(50) default NULL,
  `CFIELD` varchar(50) default NULL,
  `JOINTYPE` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `query_config_init` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `QLEFT` varchar(8) default NULL,
  `FIELD` varchar(50) default NULL,
  `SYMBOL` varchar(20) default NULL,
  `WHEREVALUE` varchar(500) default NULL,
  `QRIGHT` varchar(8) default NULL,
  `LOGIC` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `query_config_order` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `FIELD` varchar(50) default NULL,
  `TYPE` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `query_config_parameter` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `BID` varchar(8) default NULL,
  `NAME` varchar(50) default NULL,
  `FIELD` varchar(50) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `query_config_queryfield` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `FIELD` varchar(50) default NULL,
  `ISPRECISION` varchar(1) default NULL,
  `ISMUST` varchar(1) default NULL,
  `ISDAY` varchar(3) default NULL,
  `DVALUE` varchar(50) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `query_config_showfield` (
  `ID` varchar(8) NOT NULL,
  `FID` varchar(8) default NULL,
  `FIELD` varchar(50) default NULL,
  `ISSHOW` varchar(1) default NULL,
  `COLWIDTH` varchar(4) default NULL,
  `ISNUMBER` varchar(1) default NULL,
  `QALIGN` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `query_config_table` (
  `ID` varchar(8) NOT NULL,
  `NAME` varchar(50) default NULL,
  `MAINTABLE` varchar(50) default NULL,
  `TYPE` varchar(1) default NULL,
  `BID` varchar(8) default NULL,
  `IFFIRSTDATA` varchar(1) default NULL,
  `IFMULSEL` varchar(1) default NULL,
  `IFCOMBTN` varchar(1) default NULL,
  `CID` varchar(8) default NULL,
  `DCODE` varchar(64) default NULL,
  `QITEMTYPE` varchar(1) default NULL,
  `QTABLETYPE` varchar(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `query_tmp` (
  `USERID` varchar(16) NOT NULL,
  `TMP` varchar(500) NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `QUERY_PARAMETER` (
  `USERID` varchar(16) NULL,
  `QUERYID` varchar(8) NULL,
  `UP_HEIGHT` varchar(4) NULL,
  `DOWN_HEIGHT` varchar(4) NULL

) ENGINE=InnoDB DEFAULT CHARSET=gbk;


