SHOW TABLES में NOT LIKE सिंटैक्स
SHOW TABLES में NOT LIKE पैटर्न का उपयोग:
SHOW TABLES WHERE `TABLES_IN_yourDatabaseName` NOT LIKE 'yourTableName%';
उदाहरण: sample डेटाबेस में टेबल्स
mysql> USE sample; mysql> SHOW TABLES;
आउटपुट (9 टेबल्स):
+--------------------------+ | Tables_in_sample | +--------------------------+ | blobsizedemo | | insert_prevent | | insertrecord_selecttable | | insertrecordprevent | | mytable | | newlinedemo | | notequaloperator | | sumofeverydistinct | | yourtable | +--------------------------+
'insert' से शुरू न होने वाली टेबल्स
mysql> SHOW TABLES WHERE `TABLES_IN_sample` NOT LIKE 'insert%';
आउटपुट (6 टेबल्स):
+--------------------+ | Tables_in_sample | +--------------------+ | blobsizedemo | | mytable | | newlinedemo | | notequaloperator | | sumofeverydistinct | | yourtable | +--------------------+
insert_prevent, insertrecord_selecttable, insertrecordprevent बाहर हो गए क्योंकि वे 'insert' से शुरू होते हैं।
सामान्य NOT LIKE सिंटैक्स (SELECT के लिए):
SELECT * FROM table_name WHERE column_name NOT LIKE 'pattern%';