建表
CREATE TABLE `tb_venue` (
`venueid` int(10) unsigned NOT NULL auto_increment,
`venue_name` varchar(255) NOT NULL default ”,
`venue_name_en` varchar(255) NOT NULL default ”,
KEY `idx_cityid_status_featured_venueid` (`cityid`,`status`,`featured_type`,`venueid`),
KEY `idx_cityid_pinyinfull` (`cityid`,`pinyin_full`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
插入字段
alter table db_event.tb_event_info, add column `special_tickets` varchar(128) default NULL after flyer_file_name, add column `special_price` varchar(64) default NULL after flyer_file_name;
更改字段
alter table db_section.tb_section_info modify `info_type` smallint(4) NOT NULL default ’0′;
输出执行详情
explain SELECT eventid FROM db_event.tb_event WHERE cityid=1 AND create_type=1 AND `status`=1 AND featured_type < 0 AND end_date >= ’2009-06-12′ ORDER BY featured_type limit 10;
加索引
create index idx_cityid_pinyinfull on db_venue.tb_venue(cityid, pinyin_full)
(标题未注明“转载”的为“原创”,转载请注明来源,欢迎来信交流 wangchao123.com@gmail.com)


TOP