由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - SQL问题请教
相关主题
SQL问题请教: add one more columnoracle和XML
How to handle inserting value to Identity column in sql server 2005How to query a tree
SQL问题求救!!Stored Procedure?
MySQL row selection questionSQL question
About INSERT IGNOREADO & DAO &SQL...Help...
a simple question about T-SQL数据库问题求解
Do replicated tables need identical?How to use the SQL key word EXISTS?
SQL server stored procedure 求助[转载] what's wrong with this PL/SQL
相关话题的讨论汇总
话题: foo话题: sql话题: value话题: int话题: insert
进入Database版参与讨论
1 (共1页)
z*y
发帖数: 1311
1
create table foo
{
id int auto_increment not null primary key,
value int;
}
insert into foo (value) values (16);
当插入这条记录后,如何读出它的id
谢谢
i*****w
发帖数: 75
2
SELECT SCOPE_IDENTITY()

【在 z*y 的大作中提到】
: create table foo
: {
: id int auto_increment not null primary key,
: value int;
: }
: insert into foo (value) values (16);
: 当插入这条记录后,如何读出它的id
: 谢谢

f********t
发帖数: 117
3
either using return id after insert.
select curval ('seq name')
1 (共1页)
进入Database版参与讨论
相关主题
[转载] what's wrong with this PL/SQLAbout INSERT IGNORE
help about SQL for ACCESSa simple question about T-SQL
[转载] 问个SQL问题Do replicated tables need identical?
pls help me in this Sql querySQL server stored procedure 求助
SQL问题请教: add one more columnoracle和XML
How to handle inserting value to Identity column in sql server 2005How to query a tree
SQL问题求救!!Stored Procedure?
MySQL row selection questionSQL question
相关话题的讨论汇总
话题: foo话题: sql话题: value话题: int话题: insert