Thread: DBCC CheckIdent in a stored proc?

DBCC CheckIdent in a stored proc?

From
smoghe@autodesk.com
Date:
<div class="Section1"><p class="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
font-family:Georgia">Hello All,</span></font><p class="MsoNormal"><font face="Georgia" size="2"><span
style="font-size:10.0pt;
font-family:Georgia"> </span></font><p class="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
font-family:Georgia">I need to know the last id of the last record added to the table from an ASP page.
</span></font><pclass="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
 
font-family:Georgia"> </span></font><p class="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
font-family:Georgia">How do I package DBCC CheckIdent(@tableName) in a output  parameter?</span></font><p
class="MsoNormal"><fontface="Georgia" size="2"><span style="font-size:10.0pt;
 
font-family:Georgia"> </span></font><p class="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
font-family:Georgia">Thanx!</span></font><p class="MsoNormal"><font face="Georgia" size="2"><span
style="font-size:10.0pt;
font-family:Georgia">Shrirang</span></font><p class="MsoNormal"><font face="Georgia" size="2"><span
style="font-size:10.0pt;
font-family:Georgia"> </span></font><p class="MsoNormal"><font face="Georgia" size="2"><span style="font-size:10.0pt;
font-family:Georgia">p.s: I am a total newbie to DB.</span></font></div>

Re: DBCC CheckIdent in a stored proc?

From
Bhuvan A
Date:
> I need to know the last id of the last record added to the table from an
> ASP page.

=> select field1 from my_table order by oid desc limit 1; -- will do that.

regards,
bhuvaneswaran