i used this query for retrieving column name and datatype
SELECT column_name
, CASE
WHEN CHARACTER_MAXIMUM_LENGTH IS NOT NULL THEN
DATA_TYPE + '(' + convert(varchar(MAX), CHARACTER_MAXIMUM_LENGTH) + ')'
WHEN CHARACTER_MAXIMUM_LENGTH IS NULL THEN
DATA_TYPE
END as DATA_TYPE
FROM
information_schema.columns
WHERE
table_name = 'TableName#39;
ORDER BY
ordinal_position
for this query i got the varchar(50) but i got the decimal instead of decimal(18,10)
and numeric instead of numeric(25,12) like this i need this so please help me