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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -