Click here to Skip to main content
15,911,531 members
Home / Discussions / Database
   

Database

 
AnswerRe: Problem with a WHERE statement Pin
solutionsville7-Nov-07 6:33
solutionsville7-Nov-07 6:33 
QuestionHelp! I'm a beginner. Pin
meki_21186-Nov-07 3:52
meki_21186-Nov-07 3:52 
AnswerRe: Help! I'm a beginner. Pin
Colin Angus Mackay6-Nov-07 4:00
Colin Angus Mackay6-Nov-07 4:00 
AnswerRe: Help! I'm a beginner. Pin
Paul Conrad6-Nov-07 16:02
professionalPaul Conrad6-Nov-07 16:02 
QuestionRestricting Field List of Pivot table at Cube Level Pin
s.sathyanarayanan6-Nov-07 3:07
s.sathyanarayanan6-Nov-07 3:07 
QuestionHTTP ENDPOINT in SQL Pin
baala.m6-Nov-07 2:40
baala.m6-Nov-07 2:40 
AnswerRe: HTTP ENDPOINT in SQL Pin
Colin Angus Mackay6-Nov-07 2:51
Colin Angus Mackay6-Nov-07 2:51 
QuestionTRANSACT SQL "TRUNCATE" Pin
craneprince6-Nov-07 2:38
craneprince6-Nov-07 2:38 
Dear All,

I need your help

Does anyone know exactly what statement/function to put AFTER the "Truncate" function in Transact-SQL, so that the query will return the first (DEFAULT) row in the database?

For example : I have a small table named "USERS". This table has only 5 columns. But, the identity column (which is also the primary key) is the USER_ID column.

I have assigned this column the IDENTITY INCREMENT, and of course, IDENTITY SEED "1".

I issued a TRUNCATE function to erase ALL rows/records.

However, I would like to erase all rows EXCEPT the first one (which is also the DEFAULT row).

What should I state after the TRUNCATE function??

Thanks for your help.

AnswerRe: TRANSACT SQL "TRUNCATE" Pin
Colin Angus Mackay6-Nov-07 2:48
Colin Angus Mackay6-Nov-07 2:48 
GeneralRe: TRANSACT SQL "TRUNCATE" Pin
craneprince6-Nov-07 2:54
craneprince6-Nov-07 2:54 
GeneralRe: TRANSACT SQL "TRUNCATE" Pin
Colin Angus Mackay6-Nov-07 3:24
Colin Angus Mackay6-Nov-07 3:24 
AnswerRe: TRANSACT SQL "TRUNCATE" Pin
TJoe7-Nov-07 8:00
TJoe7-Nov-07 8:00 
GeneralRe: TRANSACT SQL "TRUNCATE" Pin
craneprince7-Nov-07 19:23
craneprince7-Nov-07 19:23 
GeneralRe: TRANSACT SQL "TRUNCATE" Pin
TJoe8-Nov-07 1:32
TJoe8-Nov-07 1:32 
QuestionWindows integrated Security issues Pin
kinsella_john6-Nov-07 2:31
kinsella_john6-Nov-07 2:31 
AnswerRe: Windows integrated Security issues Pin
BrokenS6-Nov-07 2:55
BrokenS6-Nov-07 2:55 
QuestionODBC Performance Pin
N a v a n e e t h6-Nov-07 2:08
N a v a n e e t h6-Nov-07 2:08 
AnswerRe: ODBC Performance Pin
Colin Angus Mackay6-Nov-07 2:17
Colin Angus Mackay6-Nov-07 2:17 
GeneralRe: ODBC Performance Pin
N a v a n e e t h6-Nov-07 2:31
N a v a n e e t h6-Nov-07 2:31 
GeneralRe: ODBC Performance Pin
Colin Angus Mackay6-Nov-07 2:35
Colin Angus Mackay6-Nov-07 2:35 
GeneralRe: ODBC Performance Pin
N a v a n e e t h6-Nov-07 2:38
N a v a n e e t h6-Nov-07 2:38 
GeneralRe: ODBC Performance Pin
Colin Angus Mackay6-Nov-07 2:45
Colin Angus Mackay6-Nov-07 2:45 
GeneralRe: ODBC Performance Pin
N a v a n e e t h6-Nov-07 2:47
N a v a n e e t h6-Nov-07 2:47 
GeneralOptionally use BCP in stored proc Pin
Brady Kelly6-Nov-07 1:41
Brady Kelly6-Nov-07 1:41 
GeneralRe: Optionally use BCP in stored proc Pin
Brady Kelly6-Nov-07 2:30
Brady Kelly6-Nov-07 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.