如题所述
å¦æ建表ä¸åå§åèæ¬å¦ä¸ï¼
CREATE TABLE IF NOT EXISTS risk_result (
resid int(11) NOT NULL AUTO_INCREMENT COMMENT '主é®id',
resbh int(11) NOT NULL COMMENT 'ç»æç¼å·',
ressc int(11) DEFAULT NULL COMMENT 'æ¶é¿',
resdw int(11) DEFAULT NULL COMMENT 'åä½1ï¼åé 2ï¼å°æ¶',
resbz varchar(100) DEFAULT NULL COMMENT 'å¤æ³¨',
PRIMARY KEY (resid)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='é£æ§ç»æ表' AUTO_INCREMENT=6 ;
--
-- 转å表ä¸çæ°æ® risk_result
--
INSERT INTO risk_result (resid, resbh, ressc, resdw, resbz) VALUES
(1, 10, NULL, NULL, 'åè¦'),
(2, 60, NULL, NULL, 'æèµ·å½å¤©'),
(3, 70, NULL, NULL, 'æèµ·å½æ'),
(4, 80, NULL, NULL, 'æ°¸ä¹ æèµ·ï¼é管çåæå¨éæ¾'),
(5, 90, NULL, NULL, 'æç»æ¬ç¬äº¤æ');
æ¥ä¸ä¸ªæ°æ®SQL为ï¼
select resid,resbh, ressc from risk_result where 1 ; #æ¥è¯¢å ¨é¨ï¼ä¹å¯ä»¥ä¸åæ¡ä»¶(where) æ¥è¯¢è¡¨ä¸çä¸ä¸ªå±æ§
æ
select resid,resbh, ressc from risk_result where 1 limit 0,3 ;#éæºæ¥è¯¢ä¸æ¡æ°æ®
CREATE TABLE IF NOT EXISTS risk_result (
resid int(11) NOT NULL AUTO_INCREMENT COMMENT '主é®id',
resbh int(11) NOT NULL COMMENT 'ç»æç¼å·',
ressc int(11) DEFAULT NULL COMMENT 'æ¶é¿',
resdw int(11) DEFAULT NULL COMMENT 'åä½1ï¼åé 2ï¼å°æ¶',
resbz varchar(100) DEFAULT NULL COMMENT 'å¤æ³¨',
PRIMARY KEY (resid)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='é£æ§ç»æ表' AUTO_INCREMENT=6 ;
--
-- 转å表ä¸çæ°æ® risk_result
--
INSERT INTO risk_result (resid, resbh, ressc, resdw, resbz) VALUES
(1, 10, NULL, NULL, 'åè¦'),
(2, 60, NULL, NULL, 'æèµ·å½å¤©'),
(3, 70, NULL, NULL, 'æèµ·å½æ'),
(4, 80, NULL, NULL, 'æ°¸ä¹ æèµ·ï¼é管çåæå¨éæ¾'),
(5, 90, NULL, NULL, 'æç»æ¬ç¬äº¤æ');
æ¥ä¸ä¸ªæ°æ®SQL为ï¼
select resid,resbh, ressc from risk_result where 1 ; #æ¥è¯¢å ¨é¨ï¼ä¹å¯ä»¥ä¸åæ¡ä»¶(where) æ¥è¯¢è¡¨ä¸çä¸ä¸ªå±æ§
æ
select resid,resbh, ressc from risk_result where 1 limit 0,3 ;#éæºæ¥è¯¢ä¸æ¡æ°æ®
温馨提示:答案为网友推荐,仅供参考