Last active
October 1, 2015 08:12
-
-
Save hacksoldier/17cc2613086cae2226f8 to your computer and use it in GitHub Desktop.
Funzione per trovare tutti i capi di tutte le tabelle su tutto il db.
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
#Databse: Microsoft SQL Server. | |
USE <database_name> | |
GO | |
SELECT table_name 'table_name', | |
column_name 'Column Name', | |
data_type 'Data Type', | |
CHARacter_maximum_length 'Maximum Length' | |
FROM information_schema.columns | |
WHERE data_type = <Type to field> | |
GO | |
#Example | |
USE wingpfull | |
GO | |
SELECT table_name 'table_name', | |
column_name 'Column Name', | |
data_type 'Data Type', | |
CHARacter_maximum_length 'Maximum Length' | |
FROM information_schema.columns | |
WHERE data_type = 'image' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment