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 |
ddon07
Starting Member
2 Posts |
Posted - 2007-11-12 : 07:27:34
|
help needed,sorry for such a basic querry please help me.i have created 2 tablesboth of them has different primary keysnow in first table there is also a refernece for primary key of second table1) how do i make these both primary keys autoincrement2) how do i make refernce to primary key of second tableliketable1itemid itemrate itemcode itemdesscriotiontable2productid itemid purchaseinvoice invoice amountalso kindly direct me to some quick and easy tutorials on SQLthanks all for your help. |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-12 : 07:39:38
|
1. To make any int column auto-increment, you need to add IDENTITY clause after it.col1 int identity(1,1)2. Search SQL Server help for CREATE TABLE keyword. you will get quite good example on how to do it.3. Google it. you will get plenty of sites for learning sql.For e.g. http://www.w3schools.com/sql/default.aspHarsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
|
|
|