SELECT
databasename,
tablename,
SUM(columnlength) ROWSIZE,
COUNT(*) columncount
FROM
dbc.COLUMNS
WHERE
databasename LIKE '%XXX%' AND TABLENAME='YYY'
GROUP BY databasename,tablename;
This method is wrong as it will not give proper rowsize for several datatypes like timestamp, varchar etc.
This method is wrong as it will not give proper rowsize for several datatypes like timestamp, varchar etc.