Created
September 18, 2012 06:35
-
-
Save davidwaterston/3741590 to your computer and use it in GitHub Desktop.
MySQL: Check if a table contains any data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select 1 | |
from __table_name__ | |
limit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will return one row if table_name contains any data and no rows if it doesn't.