Skip to content

Commit 0199df0

Browse files
committed
updating queries
1 parent 27d5a71 commit 0199df0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

query.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ var (
99
SELECT TABLE_NAME
1010
FROM INFORMATION_SCHEMA.TABLES
1111
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = '%s'
12-
AND TABLE_ROWS < 200 AND TABLE_ROWS > 35;
12+
AND TABLE_ROWS < 300 AND TABLE_ROWS > 35;
1313
`, db)
1414
}
1515
SHOW_CREATE = func(dbName, tableName string) string {
1616
return fmt.Sprintf("SHOW CREATE TABLE %s.%s;", dbName, tableName)
1717
}
1818
SELECT_COLUMNS = func(tableName string) string {
19-
return fmt.Sprintf("SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='%s';", tableName)
19+
return fmt.Sprintf("SELECT DISTINCT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='%s';", tableName)
2020
}
2121
DROP_DB = func(dbName string) string {
2222
return fmt.Sprintf("DROP DATABASE IF EXISTS %s", dbName)

0 commit comments

Comments
 (0)