आप टेबल नाम references नहीं दे सकते क्योंकि यह एक आरक्षित कीवर्ड है। इसे बैकटिक्स में लपेटें, उदाहरण: `references`।
उदाहरण
टेबल बनाएं:
mysql> create table `references` (Subject text); Query OK, 0 rows affected (0.44 sec)
रिकॉर्ड डालें:
mysql> insert into `references` values('Introduction To MySQL');
Query OK, 1 row affected (0.28 sec)
mysql> insert into `references` values('Introduction To MongoDB');
Query OK, 1 row affected (0.15 sec)
mysql> insert into `references` values('Introduction To Spring and Hibernate');
Query OK, 1 row affected (0.13 sec)
mysql> insert into `references` values('Introduction To Java');
Query OK, 1 row affected (0.18 sec)
सभी रिकॉर्ड देखें:
mysql> select * from `references`;
आउटपुट
+--------------------------------------+ | Subject | +--------------------------------------+ | Introduction To MySQL | | Introduction To MongoDB | | Introduction To Spring and Hibernate | | Introduction To Java | +--------------------------------------+ 4 rows in set (0.00 sec)
महत्वपूर्ण: MySQL में आरक्षित शब्दों (references, select, where, order, group, when, key, index, आदि) को पहचानकर्ता (टेबल/कॉलम नाम) के रूप में उपयोग करने के लिए बैकटिक्स अनिवार्य हैं।