Hi, not sure if this is the right forum for this question.
I am creating relational tables for the first time in sql server express. I will have an orderItems table and an orders table. the MenuItems table is the problem. It is a catalogue of books. There will be about ten columns. all are unique to each book. i.e isbn number, title, author, publisher etc. but ten columns seems to be quite cumbersome. it may be easier to break the table down into two tables (i.e. primary details and secondary details perhaps) However to populate the table in the first place it would be easier to have it as one table instead of opening and closing 2 tables Adding the odd book to the two tables in the future would not be a problem. so the question is can i create a table and then brak it into two relational tables afterwards. If so how do i do this. this is my foirst go at relational tables and i am still trying to get a handle on visualising them. If my logic is up the wall please let me know...
Nick
Yes you can do this. Once you have your "big" table populated simply create the second smaller table and just execute an update statement:
update mySmallTable
set field1 = b.field1
, field2 = b.field2
, field3 = b.field3
from myBigTable b
Great. Im really moving forward now. thanks for your time
Nick
No comments:
Post a Comment