php - Mysql add column from another table (no reference id)
Table small containscolumn A varchar(10)
column B varchar(20)
Table skeleton containscolumn A varchar(10)
column B varchar(20)
column C varchar(30)
column D varchar(40)
I want to add column C varchar(30) from table skeleton to small table.
Please note skeleton contains no data and two table doesn't have any common key to join.
@Ultimater thanks.. but that will not solve the issue.. Actually I don't know which column will be needed to add, it will be based on source data.... small table is actually a dynamic table which will grow in times.... skeleton table is like a schema table to get exact column name and type from it. Hope you understand....
@update my data feed for small table will be an XML file I do have XSD file also... so if anybody could give any XSD reader library for PHP other than xsdreader - (which I tried without much success) then it will equally solve my problem... Hope You Understand.
Answer
Solution:
If I understood you correctly, all you're trying to do is add another column to an already existing table. This is quite simple with phpMyAdmin for example. In your case all you'd need is: