phpMyAdmin
 sql >> डेटाबेस >  >> Database Tools >> phpMyAdmin

csv यूनिकोड से utf8 phpmyadmin में आयात करें

मैं खुले दस्तावेज़ प्रारूप और phpmyadmin के बारे में नहीं बता सकता, लेकिन आप सफलतापूर्वक CSV के रूप में स्वरूपित अपने डेटा को सफलतापूर्वक आयात कर सकते हैं

LOAD DATA INFILE '/path/to/your/file.csv' INTO TABLE `table 1`
CHARACTER SET 'utf8'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES

सीएसवी के रूप में ठीक से प्रारूपित करने से मेरा मतलब है

CL_in_Character,CL_in_Pinyin,Definition_in_Dictionary,Associated_nouns_in_Chinese,Associated_nouns_in_English,Associated_noun_categories
"巴掌","bāzhang","(a slap of the) palm","打","beat","human activities"
"巴掌","bāzhang","(a slap of the) palm","搧","spank","human activities"
"巴掌","bāzhang","(a slap of the) palm","揍","hit","human activities"
"把","bá","tools and objects with a handle","扫帚","broom","tools"
"把","bá","tools and objects with a handle","锁","lock","man-made"

आइए इसे आजमाएं

mysql> CREATE TABLE `table 1` (
    ->  `CL_in_Character` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
    ->  `CL_in_Pinyin` varchar(14) CHARACTER SET utf8 DEFAULT NULL,
    ->  `Definition_in_Dictionary` varchar(74) CHARACTER SET utf8 DEFAULT NULL,
    ->  `Associated_nouns_in_Chinese` varchar(16) CHARACTER SET utf8 DEFAULT NULL,
    ->  `Associated_nouns_in_English` varchar(38) CHARACTER SET utf8 DEFAULT NULL,
    ->  `Associated_noun_categories` varchar(38) CHARACTER SET utf8 DEFAULT NULL
    ->  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Query OK, 0 rows affected (0.03 sec)

mysql> LOAD DATA INFILE '/tmp/utf.csv' INTO TABLE `table 1`
    -> CHARACTER SET 'utf8'
    -> FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    -> LINES TERMINATED BY '\n'
    -> IGNORE 1 LINES;
Query OK, 5 rows affected (0.00 sec)
Records: 5  Deleted: 0  Skipped: 0  Warnings: 0

mysql> select * from `table 1`;
+-----------------+--------------+---------------------------------+-----------------------------+-----------------------------+----------------------------+
| CL_in_Character | CL_in_Pinyin | Definition_in_Dictionary        | Associated_nouns_in_Chinese | Associated_nouns_in_English | Associated_noun_categories |
+-----------------+--------------+---------------------------------+-----------------------------+-----------------------------+----------------------------+
| 巴掌            | bāzhang      | (a slap of the) palm            | 打                          | beat                        | human activities           |
| 巴掌            | bāzhang      | (a slap of the) palm            | 搧                          | spank                       | human activities           |
| 巴掌            | bāzhang      | (a slap of the) palm            | 揍                          | hit                         | human activities           |
| 把              | bá           | tools and objects with a handle | 扫帚                        | broom                       | tools                      |
| 把              | bá           | tools and objects with a handle | 锁                          | lock                        | man-made                   |
+-----------------+--------------+---------------------------------+-----------------------------+-----------------------------+----------------------------+
5 rows in set (0.00 sec)


  1. DBeaver
  2.   
  3. phpMyAdmin
  4.   
  5. Navicat
  6.   
  7. SSMS
  8.   
  9. MySQL Workbench
  10.   
  11. SQLyog
  1. phpMyAdmin रिमोट एक्सेस

  2. सशर्त रूप से MYSQL कॉलम का चयन करना

  3. PhpMyAdmin के माध्यम से टनल डीबी से कनेक्ट करें

  4. मैं एक ड्रूपल साइट को अमेज़ॅन वेब सर्विसेज ईसी 2 में कैसे माइग्रेट कर सकता हूं?

  5. कैसे php में डेटाबेस में गतिशील सरणी सम्मिलित करने के लिए?