Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nheijmink
Starting Member
8 Posts |
Posted - 2007-11-13 : 09:03:37
|
i'm quite new with sql and i have an question about het insert statements.Is the order of the insert statements from any importance?and why is/isn't it?Greetz |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-13 : 09:05:36
|
What do you mean by order? order in which insert statements executed?It is important in case of parent child relationship.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
nheijmink
Starting Member
8 Posts |
Posted - 2007-11-13 : 11:39:51
|
What i actualy meant was: that when i carry out a couple of statements, is the oder in wich they are carry'd out from any importance?greetz |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-13 : 11:45:10
|
Yes. It is important. as harsh said. if you have 2 table with parent - child relationship (foreign key), you must insert to the parent table first follow by child table.If the tables you are inserted into has no relationship at all, than the order or sequence might not be important. KH[spoiler]Time is always against us[/spoiler] |
|
|
nheijmink
Starting Member
8 Posts |
Posted - 2007-11-13 : 11:50:30
|
tnks guys your the best |
|
|
nheijmink
Starting Member
8 Posts |
Posted - 2007-11-15 : 08:51:48
|
i have only one question left it is not quite important but wat actualy happens when i do not put the insert statements in the right order ( in case of an partent child relationship)?greetz |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-15 : 08:57:46
|
try that yourself to find out what kind of error it returns KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|