CREATE TABLE `user` (
`user_id` int NOT NULL,
`name` varchar(50) NOT NULL,
`hobby` varchar(50) #optional, hobby is always written in hashtags
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
INSERT INTO `user` (`user_id`, `name`, `hobby`)
('148723', 'max', 'random text #football'),
('578294', 'john', 'random text2'),
...
I want to create a table with only the ID and the hobby like so:
('148723', '#football')
...
Is there any way to do this in MySQL or do I have to use Python? Thanks in advance.