问题描述
示例:
创建表emp1(id int identity(1,1),name varchar(40))
插入int emp1值(``jhanu'')
插入emp1值(``vijji'')
从emp1选择*
结果:
编号名称
1詹努
2 vijji
从emp1中删除
记录将从表中删除
我再次在表emp1中插入数据
插入emp1值(``Pravi'')
它将显示出输出
编号名称
3 pravi
但是我需要从表中删除行后,我需要显示仅从1开始的标识字段值
例子
编号名称
1个pravi
我应该这样显示,
因此,任何人都知道这种查询类型.请帮我,我对sqlserever
Example:
create table emp1(id int identity(1,1),name varchar(40))
insert int emp1 values(''jhanu'')
insert into emp1 values(''vijji'')
select * from emp1
Result:
id name
1 jhanu
2 vijji
Delete from emp1
Records will be deleted from table
Again i am inserting data in the table emp1
insert into emp1 values(''Pravi'')
it will show the out put
id name
3 pravi
But i need after delete the Rows from table i need to display identity field value start from 1 only
example
id name
1 pravi
like this i should display,
So anybody knows this type of query pls Help me I am very new to sqlserever
推荐答案
这篇关于如果我从表中删除了身份行,我也想从起始身份中删除行后从起始身份中显示吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!