Skip to content

Instantly share code, notes, and snippets.

@LeandroLS
Last active July 17, 2017 22:52
Show Gist options
  • Save LeandroLS/2c6fd57c35c2ede05c553b87418b0677 to your computer and use it in GitHub Desktop.
Save LeandroLS/2c6fd57c35c2ede05c553b87418b0677 to your computer and use it in GitHub Desktop.
Post GROUP_CONCAT com valores nullos
CREATE TABLE `frutas` (
`nome_frutas` varchar(50) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
)
INSERT INTO `frutas` (`nome_frutas`) VALUES ('maçã');
INSERT INTO `frutas` (`nome_frutas`) VALUES (NULL);
INSERT INTO `frutas` (`nome_frutas`) VALUES ('banana');
INSERT INTO `frutas` (`nome_frutas`) VALUES (NULL);
INSERT INTO `frutas` (`nome_frutas`) VALUES ('melão');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment