Link to home
Create AccountLog in
Avatar of rutgermons
rutgermons

asked on

nextval in sql server

folks

the function nextval,is it from oracle and what does it do? what is it in sql server?

rutger
Avatar of Aneesh
Aneesh
Flag of Canada image

you need to create a procedure in sql server

read this
http://jamesthornton.com/software/coldfusion/nextval.html
Avatar of rutgermons
rutgermons

ASKER

anees

so with this example as you attached I now have a field called LocationsID with I want to populate the keys during my insert

what do I use

i.e insert into work(locationsID)values(???????)

what must I call this field?
f you need that colun to be automaticlly incremented, then modify that column as identity

ALTER TABLE Work
ALTER COLUMN LocationsID int IDENTITY
anees,

see i have to do an insert of 100's of records

could you help me with this solution please in the form of a working example with the table work

all help will be highly regarded

r
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer