I have a table called table1
and columns named id
, name
,field1
, field2
, field3
.
And i want to check the columns are exist. If any one of the column does not exist, i want to add that columns to the table.
Eg: i have column names called id
, name
,field1
, field2
, field3
. And i want to check is there any columns named field3
, field4
, field5
. In this field3
exists and other 2 are not. so i want to add that 2 columns in table1
table. Is this possible using hasColumns
?. Or suggest me other ways?