I want the correct syntax for changing column name of a database. Following not working where I want to change names of 2 columns, one from old to new, other from good to bad..thnx
B4X:
Dim chngQuery As String= "ALTER TABLE " &Main.DBTable & " CHANGE COLUMN old new CHANGE COLUMN good bad"
Main.SQL1.ExecNonQuery(chngQuery)
If backwards compatibility is a must (see comments to this stackoverflow post: https://stackoverflow.com/a/21956882), one may look into the alternative solution I linked to above that uses substr and concatenation.
Note: The question by @harinder should have probably been posted as a new forum question. At that point, others with more SQL knowledge may have lent a helping hand.
Yes Mahares..point taken..but also that if H and M are taken separately, manipulated and another routine added to store HH:MM in its particular column, then it takes quite a few coding lines to accomplish the task...plus isn't sql faster to handle this task? thnx
Note: The question by @harinder should have probably been posted as a new forum question. At that point, others with more SQL knowledge may have lent a helping hand.
Point taken for future compliance, but my post wherein I clarified with the reframing of my query giving exact table info was to clarify what I exactly wanted, else this thread was hanging at a loose end....