Extensions Cleanup (#359)

* clean up extensions

* updated copyrights

* formatting
This commit is contained in:
Anthony Dresser
2017-12-20 21:35:52 -08:00
committed by GitHub
parent b1b3a92717
commit 8afebd2e10
72 changed files with 2352 additions and 5359 deletions

View File

@@ -208,10 +208,10 @@
"body": [
"-- Get a list of tables and views in the current database",
"SELECT table_catalog [database], table_schema [schema], table_name name, table_type type",
"FROM INFORMATION_SCHEMA.TABLES",
"FROM information_schema.tables",
"GO"
],
"description": "List tables and views in the current database"
"description": "List tables and vies in the current database"
},
"List databases": {
@@ -229,15 +229,15 @@
"body": [
"-- List columns in all tables whose name is like '${1:TableName}'",
"SELECT ",
"\tTableName = tbl.TABLE_SCHEMA + '.' + tbl.TABLE_NAME, ",
"\tColumnName = col.COLUMN_NAME, ",
"\tColumnDataType = col.DATA_TYPE",
"FROM INFORMATION_SCHEMA.TABLES tbl",
"INNER JOIN INFORMATION_SCHEMA.COLUMNS col ",
"\tON col.TABLE_NAME = tbl.TABLE_NAME",
"\tAND col.TABLE_SCHEMA = tbl.TABLE_SCHEMA",
"\tTableName = tbl.table_schema + '.' + tbl.table_name, ",
"\tColumnName = col.column_name, ",
"\tColumnDataType = col.data_type",
"FROM information_schema.tables tbl",
"INNER JOIN information_schema.columns col ",
"\tON col.table_name = tbl.table_name",
"\tAND col.table_schema = tbl.table_schema",
"",
"WHERE tbl.TABLE_TYPE = 'BASE TABLE' and tbl.TABLE_NAME like '%${1:TableName}%'",
"WHERE tbl.table_type = 'base table' and tbl.table_name like '%${1:TableName}%'",
"GO"
],
"description": "Lists all the columns and their types for tables matching a LIKE statement"