Http://blog.sina.com.cn/s/blog_a342ff0a0101u3kb.htmlSQL Server:Solution 1:select Top * from a where ID not in (select top with ID from a);Solution 2:select Top * from a Where ID > (select MAX (ID) from (select top with ID from a) as A);As I
How to obtain the id of a record when inserting a record into mysql? how to obtain the id of this record when inserting a record into mysql? & nbsp; what is the effect I want? when inserting a record & nbsp; there is a field value to share with id:
Multiple unrelated columns are combined to form a PL/SQL record type, which can be processed as a whole. In addition, PL/SQL record types can be performedNesting and defining Union arrays and nested tables based on PL/SQL records. This article first
A recent problem in the development project was to get the ID in the database immediately after inserting a record, and that ID was self increasing. There are several ways in which SQL Server 2005 can be implemented. The easiest way to get this ID
In actual database applications, we often need to get the inserted flag value to write data into the relevant table. But what we usually get is the value we need?Sometimes we use select @ identity to obtain the value we just inserted, such as the
SQL Server Scenario 1:Select top * from T where ID not in (select top with ID from T order by ID) Orde by IDSQL Server Scenario 2:Select top * from T where ID in (select top all IDs from T order by ID) Order BY id DESCMySQL Scenario: SELECT * FROM T
Set the record ID to @ ID
The above record is:Select top 1 * From Table1 where sorting field Sort field from Table1 where id = @ ID) order by sort field DESCThe following record is:Select top 1 *From Table1 where sorting field> (select sorting field
How to get the ID value of this record when inserting records into MySQL
How to get the ID value of this record when inserting records into MySQL
What's the effect I want? When inserting a record, the value of a field is the same as the ID.
Share
For more information about bugs fixed in SQL Server 2000 Service Pack 4, click the following article number to view the article in the Microsoft Knowledge Base:314128 FIX: When an RPC call is performed, Access with conflicting values includes an
Ask for a basic mysql question. (in PHP) copy a record with id a to the same table and generate a new record. in this process, modify the values of some fields. how can this problem be written? This is the case: when a user copies a published item
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.