How to add new column to MySQL table without listing other existing columns -
say have mysql table has 100 columns. now, know if wanted have new column has sum of values of 2 columns use sum
function on 2 columns after select
, have list names of other 100 columns. there way have table has 100 columns plus sum
function without listing columns after select
.
select c1+c2, c1, c2, c3, c4,...,c100 columns
try:
select c1+c2, t.* columns t
Comments
Post a Comment