This article is half-done without your Comment! *** Please share your thoughts via Comment ***
One of the most things that I liked about MySQL RDBMS is, It supported different types of Storage Engine for different types of requirement.
I have also published one related article, How to import and export CSV data in MySQL.
Additionally, MySQL has a wonderful CSV (Comma Separated Value) storage engine to store table data directly into CSV file.
When you create any table with CSV storage engine, It creates table_name.frm file and table_name.csv file into /../MySQL/Data/Database directory.
You can easily open that table_name.csv file and You can also SELECT that CSV table data using MySQL Query Window.
Few Important Points:
CSV storage engine does not support NULL columns, all columns must be NOT NULL.
CSV storage engine does not support any type of Indexing.
CSV storage engine does not support Table Partitioning.
Create a sample table using CSV Stroage Engine:
1 2 3 4 5 |
CREATE TABLE tbl_Students ( RNO INT NOT NULL ,StudName VARCHAR(20) NOT NULL )ENGINE = CSV; |
Insert few records:
1 2 3 4 |
INSERT INTO tbl_Students VALUES (1,'Anvesh'),(2,'Neevan') ,(3,'Jeeny'),(4,'Roy'); |
Check the result of table and also check .csv file which is created in /../MySQL/Data/Database directory.
1 2 3 4 5 6 7 8 9 |
SELECT *FROM tbl_Students; +------+----------+ | RNO | StudName | +------+----------+ | 1 | Anvesh | | 2 | Neevan | | 3 | Jeeny | | 4 | Roy | +------+----------+ |
Leave a Reply