Thursday, October 26, 2017

SQL scripts repo

Just sharing a collection of SQL commands which we can use for various information retrieving w.r.t databases and tables in an SQL instance. Will try to keep this post updated with the commands I encounter. 

Go here... https://github.com/dax516/SQL/    

  • One example is as below is a command to check the number of tables in a particular database
    USE [YOUR DATABASE NAME]
    SELECT COUNT(*) from information_schema.tables
    WHERE table_type = 'base table' 
Happy coding! 

No comments:

Post a Comment