0
嗨,我对MySQL工作台下面的表结构的表example_1
MySQL表创建
但由于某些原因,我想重新创建phpmyadmin
与create table sysntax
像下面
phpmyadmin
CREATE TABLE `example_1` (
`job_id` int(11) NOT NULL AUTO_INCREMENT,
`source_id` int(11) DEFAULT NULL,
`publication_id` int(11) DEFAULT NULL,
`facility_id` int(11) DEFAULT NULL,
`job_type_id` int(11) NOT NULL,
`template_id` int(11) DEFAULT NULL,
`account_num` varchar(9) DEFAULT NULL,
`start_dt` datetime DEFAULT NULL,
`end_dt` datetime DEFAULT NULL,
`pdf_path` varchar(20) DEFAULT NULL,
`admin_user_id` int(11) NOT NULL,
`skills` varchar(255) DEFAULT NULL,
`tracking_pixel` varchar(255) DEFAULT NULL,
`auto_renew` smallint(6) DEFAULT NULL,
PRIMARY KEY (`job_id`),
KEY `source_id_idxfk` (`source_id`),
KEY `facility_id_idxfk` (`facility_id`),
KEY `job_type_id_idxfk` (`job_type_id`),
KEY `template_id_idxfk` (`template_id`),
CONSTRAINT `jp_job_ibfk_1` FOREIGN KEY (`source_id`) REFERENCES `jp_source` (`source_id`),
CONSTRAINT `jp_job_ibfk_2` FOREIGN KEY (`facility_id`) REFERENCES `adm_facility` (`facility_id`),
CONSTRAINT `jp_job_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `jp_job_type` (`job_type_id`),
CONSTRAINT `jp_job_ibfk_4` FOREIGN KEY (`template_id`) REFERENCES `jp_template` (`template_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
我已经复制并粘贴相同的创建T:
在MySQL工作台创建表的代码他同桌,然后我得到了以下错误
错误:
InnoDB
Supports transactions, row-level locking, and foreign keys
[ Variables | Buffer Pool | InnoDB Status ]
任何人都可以请让我知道如何才能避免错误和在phpMyAdmin SQL编辑器
创建一个表编辑代码
被引用的表是否存在? –
@Lex:非常感谢你真的没有参考表,所以我创建了这些表,并再次运行查询,它工作 –
大获成功!对我来说太糟糕了,我没有把它作为一个传言......很高兴能有帮助。 –