Q:

How to call MySQL function for every column that is present in table?

I need to call a mySQL function for all columns in a table.
I know how to do it for a particular column
Like this:
UPDATE `table_name` set `column_name` = function_name(`column_name`)
But i have no clue how to do it for all columns at once.
Thanks in advance.
Little clarification: I dont want to manually mention all columns, as i probably could have 200 columns table.

A:

But i have no clue how to do it for all columns at once. 

You just can't - there is no such shortcut in the update syntax.
You can do this with a single update statement, but you need to enumerate each and every column, like:
update table_name set
    column_name1 = function_name(column_name1),
    column_name2 = function_name(column_name2),
    column_name3 = function_name(column_name3)

An alternative would be to use dynamic SQL to programatically generate the proper query string from catalog table information_schema.columns, and then execute it. This seems uterly complicated for what looks like a one-shot task... But here is sample code for that:
-- input variables
set @table_schema  = 'myschema';
set @table_name    = 'mytable';
set @function_name = 'myfunction';

-- in case "GROUP_CONCAT()" returns more than 1024 characters
set session group_concat_max_len = 100000;

-- build the "set" clause of the query string
select
    @sql := group_concat(
        '`', column_name, '` = ', @table_schema, '.', @function_name, '(`', column_name, '`)'
        separator ', '
    )
from information_schema.columns
where table_schema = @table_schema and table_name = @table_name;

-- entire query string
set @sql := concat('update ', @table_schema, '.', @table_name, ' set ', @sql);

-- debug
select @sql mysql;

-- execute for real
prepare stmt from @sql;
execute stmt;
deallocate prepare stmt;

