Created
August 22, 2018 17:25
-
-
Save mvillegascuellar/a92acc30d60247e2f5c6d462d4e0248c to your computer and use it in GitHub Desktop.
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
CREATE PROCEDURE #spu_ObtenerTablasColumnas | |
AS | |
SELECT t.TABLE_SCHEMA, t.TABLE_NAME, COUNT(1) AS NUMERO_COLUMNAS | |
FROM INFORMATION_SCHEMA.TABLES t | |
INNER JOIN INFORMATION_SCHEMA.COLUMNS c | |
on t.TABLE_SCHEMA = c.TABLE_SCHEMA | |
and t.TABLE_NAME = c.TABLE_NAME | |
GROUP BY t.TABLE_SCHEMA, t.TABLE_NAME | |
ORDER BY 1,2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment