Recommended: How to get the ID number of the record that has just been inserted into the database? 1.SQL Server For SQL Server 2000, it provides two new functions (IDENT_CURRENT, SCOPE_IDENTITY), and improves the shortcomings of @@IDENTITY. When you insert a new record, you can call the function: PRINT IDENT_CURRENT('table') 'This will get the new IDENTITY value regardless of whether there are records in the database or not (this will avoid it.
| Functions or procedures defined in function may have return values, while functions or procedures defined in sub do not return values. For example: functiontestvalue() testvalue=If you are hungry, you have to eat, hoho ' function name is the return value endfunction subtestsub() Response.Write (If you are hungry, you have to eat, hoho) endsub Call these two functions in the program. <% Response.Write(testvalue()) testsub() %> |
Share: Asp tutorial on how to create 2-column pagination display code Display format: ID NAME | ID NAME 1 JULIET | 2 PALYBOY 3 BABY |4 TOM 5 LENA | 6 JERY Number of pages before and after pages: 1/4 6 items/Total number of records on pages: 25 codes: !--#include file=conn.asp-- html body bgcolor=#FFFFF text=#000000 table width=60% border=1