Get the Column Default Value in MySQL Database

zzz
 
on Oct 15, 2015 02:42 AM
5237 Views

Hello, I have database which consists of many columns. And I have one field with default value let say the default value of that field is FOLDERNAME,
how can I can get that FOLDERNAME?

Thanks

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Andrea
 
on Oct 15, 2015 02:42 AM
Hi @zzz,
Please try the following

How to insert NULL value when TextBox is empty in MySql database using C# .Net

It might help you.

Cheers Andrea.
zzz
 
on Oct 15, 2015 02:56 AM

Hello Andrea, sorry but it is not what I am looking for

Shashikant
 
on Oct 15, 2015 03:01 AM

Please refer below script

SELECT COLUMN_DEFAULT AS DefaultValue 
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_NAME='TableName' 
AND COLUMN_NAME = 'ColumnName'