mysql - SQL - can i add word every column? -


i trying add temporary word every column loop or else on mysql ? when im try select full_name players.

can example :

+--------------+ |  full_name   | +--------------+ | ahmed sayed  | +----+------+--+ | **any word** | +--------------+ | kareem gaber | +------+-------+ | **any word** | +------+-------+ | omar galal   | +--------------+ | **any word** | +------+-------+ | mohamed gad  |   +------+-------+ | **any word** | +--------------+ 

you can joining table itself. i've made example you: (you can use test table if want try code , reuse in tables).

create table test     (`id` int, `productname` varchar(7), `description` varchar(55)) ;  insert test     (`id`, `productname`, `description`) values     (1, 'openidm', 'platform building enterprise provisioning solutions'),     (2, 'openam', 'full-featured access management'),     (3, 'opendj', 'robust ldap server java') ; 

and query:

    select      case      when query = '1' productname      else "any word"      end name      (     select 1 query, t1.* test  t1     union     select 2 query, t2.* test t2 )as t3 order id, query; 

ask whatever need if it's not clear.

not sure how save query in sql fiddle can paste here: http://sqlfiddle.com/#!9/8f530/1


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -