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 |
|
suwei
Starting Member
10 Posts |
Posted - 2004-04-18 : 21:13:38
|
| i have a sql statement ,i don't know its meaning,plz help meSelect IDENTITY(int,1,1) As P_id into product_Det From products |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-04-18 : 21:18:27
|
| It will create a new table called product_det with an identity column called P_ID, it will create one row for every row in products. You would need to specify more fields if you want them in the new table.Look up Identity function in books online.Damian |
 |
|
|
suwei
Starting Member
10 Posts |
Posted - 2004-04-18 : 22:05:44
|
| thanks very much |
 |
|
|
suwei
Starting Member
10 Posts |
Posted - 2004-04-18 : 22:10:33
|
| but if there isn't a field with the identity in the table products,can the above sql be used? |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-04-18 : 22:12:37
|
| Yes, what this will do is create a copy of products with a new identity field.Damian |
 |
|
|
suwei
Starting Member
10 Posts |
Posted - 2004-04-18 : 22:17:37
|
| thanks |
 |
|
|
|
|
|