I have a query related to database, I have explained it in detail below:
I have one table companymaster which contains companycode (primary key) and companyname as their field. There are three entry as per below. 1,abc-2,xyz-3,qpr. another table which contains productcode(primary key), company code(reference of companycode) and product name. in which there are some entries like 1,1,mnp-2,1,jnp and 3,1,rst.
I want a query which can create a new table having name as abc and files as mnp,jnp,rst at run time. Please help.