Reputation: 447
My file looks like this
CREATE TABLE book (
isbn VARCHAR(10) NOT NULL,
title VARCHAR(170) NOT NULL,
author VARCHAR(50) NOT NULL,
price SMALLINT NOT NULL,
mrp SMALLINT,
pages VARCHAR(11),
lang VARCHAR(10),
dimensions VARCHAR(25),
publisher VARCHAR(200),
summary VARCHAR(MAX),
about_author VARCHAR(MAX),
review VARCHAR(MAX),
rank_ int IDENTITY(1,1),
CONSTRAINT PK_isbn PRIMARY KEY(isbn)
);
INSERT INTO book VALUES ('8129135728', 'Half Girlfriend', 'Chetan Bhagat', 80.0, 176.0, '260 pages', 'English', '13.3 x 1.8 x 19.5 cm', 'Rupa & Co; 3rd edition (1 October 2014)', '<div> Once upon a time...</div>', NULL, NULL)
INSERT INTO book VALUES ('8129135523', '2 States : The Story of My Marriage', 'Chetan Bhagat', 111.0, 176.0, '269 pages', 'English', '12.9 x 19.8 cm', 'Rupa Publications India (1 January 2014)', '<div> Many writers are successful...</div>', 'about author', NULL)
.
.
There are more rows to insert.
I ran this file's content as a query in visual studio and it worked. How can I do something like that in IntelliJ with MySQL?
I just want the content in the database. It doesn't have to be done only through IntelliJ.
Upvotes: 0
Views: 34
Reputation: 1349
This is an easy task, use MySQL Workbench here: http://dev.mysql.com/downloads/workbench/
Upvotes: 1