From b45b4658307711999581788dba85826bd857aef6 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 6 Jan 2015 01:49:37 +0100 Subject: udd: also describe tables --- bin/udd-query.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/udd-query.sh b/bin/udd-query.sh index 50ac1de8..92de9829 100755 --- a/bin/udd-query.sh +++ b/bin/udd-query.sh @@ -27,7 +27,13 @@ list_tables() { FROM information_schema.tables ORDER BY table_schema,table_name;" udd_query - cat $UDD + echo + for TABLE in $(cat $UDD | cut -d "|" -f2) ; do + SQL_QUERY="SELECT column_name, data_type, character_maximum_length + FROM INFORMATION_SCHEMA.COLUMNS where table_name = '$TABLE';" + cat $UDD + echo + done rm $UDD } -- cgit v1.2.3-70-g09d2