设置为SQL Server 2005中的表变量的Identity_insert [英] Set, Identity_insert on for the table variable in sql server 2005

查看:120
本文介绍了设置为SQL Server 2005中的表变量的Identity_insert的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server 2005中设置表变量的identity_insert?

How to set, identity_insert on for the table variable in sql server 2005 ?

推荐答案

在sql中使用alter table命令更改表并使列数据类型首先插入要写入的identity(1,1),以使其计数器从1开始并使其以1递增,当您插入记录时,请不要包括该identity列.

普拉萨德:-D
use alter table command in sql to alter the table and make the columns datatype to int first the write identity(1,1) as to start its counter by 1 and to make its increment by 1, when you insert a record just do not include that identity column.

Prasad :-D


嗨普拉萨德,

这不是我所需要的!!! ...正确地回答问题....
Hi Prasad,

This is not what i need !!!...Get the question properly....


这篇关于设置为SQL Server 2005中的表变量的Identity_insert的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆