1.查省SELECT * FROM china WHERE china.Pid=02.查市SELECT * FROM chinaWHERE china.Pid=3300003.查区SELECT * FROM china WHERE china.Pid = 3301004.Mysql脚本DROP TABLE IF EXISTS `china`; CREATE TABLE `china` ( `Id` INT(11) NOT NULL, `Name` VARCHAR(40) DEFAULT NULL, `Pid` INT(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `FK_CHINA_REFERENCE_CHINA` (`Pid`), CONSTRAINT `FK_CHINA_REFERENCE_CHINA` FOREIGN KEY (`Pid`) REFERENCES `china` (`Id`) ) ENGINE=INNODB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of china -- ----------------------------
sql下载