можешь,сделай его только NULL по умолчанию
--
-- Table structure for table `category`
--
CREATE TABLE IF NOT EXISTS `category` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`parent_id` int(8) DEFAULT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `category`
--
INSERT INTO `category` (`id`, `parent_id`, `name`) VALUES
(1, NULL, 'Цветы'),
(2, 1, 'Розы');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `category`
--
ALTER TABLE `category`
ADD CONSTRAINT `category` FOREIGN KEY (`parent_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
[/PHP]
Создал таблицу, если меняю id родительской записи пишет:
#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`category`, CONSTRAINT `category` FOREIGN KEY (`parent_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)