MySQL返回一个空结果集(即零行)

时间:2014-10-01 13:02:05

标签: mysql

" MySQL返回一个空的结果集(即零行)。"
什么时候应该返回行..   现在怎么办?

       CREATE TABLE IF NOT EXISTS `users` (
       `id` int(11) NOT NULL AUTO_INCREMENT,
       `username` varchar(255) NOT NULL,
       `first_name` varchar(255) NOT NULL,
       `last_name` varchar(255) NOT NULL,
       `email` varchar(255) NOT NULL,
       `password` varchar(255) NOT NULL,
       `sign_up_date` date NOT NULL,
       `activated` enum('0','1') NOT NULL,
        PRIMARY KEY (`id`)
        ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

1 个答案:

答案 0 :(得分:0)

试试这个:

 CREATE TABLE IF NOT EXISTS `users` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `username` varchar(255) NOT NULL,
   `first_name` varchar(255) NOT NULL,
   `last_name` varchar(255) NOT NULL,
   `email` varchar(255) NOT NULL,
   `password` varchar(255) NOT NULL,
   `sign_up_date` date NOT NULL,
   `activated` enum('0','1') NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;