vendredi 1 juillet 2016

MS SQL Server, Create and update a table based on another table

I want to try and create a boolean table with the same structure as another table. I know how to create the table but my issue is the updating.

Lets say i have the table A1 with 10 columns with different attributes for a person such as, height, run speed, name, hair colour etc.

I then want to be able to modifiy this table by either removing or adding columns to table A1 and these updates apply to my other column B1 so it has the same columns but a boolean value (the boolean value is not based on A1).

My first question is if it's doable.

My second is: Will the updates be super ineffecient for lets say 200-300 records.

(I could probably create an external program that reads the table and manually removes and adds columns via ADD/DROP sql statements, but i was hoping there was a more dynamic/efficent solution)

Aucun commentaire:

Enregistrer un commentaire