给我一个更新专栏的想法. [英] Give me an idea to update a column....

查看:86
本文介绍了给我一个更新专栏的想法.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更新行数的单列.

我的表具有诸如注册号,批号,名称之类的列.



现在我想更新批号,现在为空.其他列中有数据.近300个

行在那里.甚至我也想更新该批次,例如001,002,003,004,以此类推.

我不想一一更新.这很困难,需要更多时间.



如果可能的话,您能建议我如何通过单个查询更新它吗?

预先感谢.

How can i update a single column on number of rows.

My table having columns like registration no,batch no,name .



now i wanna update batch no,which is in null now.other columns are having data . nearly 300

rows are there. Even i wanna update the batch no like 001,002,003,004 and so on.

I dont wanna update one by one .It''s difficult and take more time .



Can u people suggest me that how to update it with single query ,if it is possible.

Beforehand thanks .

推荐答案

是的,我建议使用Google-它会为您解决这个基本问题.这是解决问题所需的链接-http://www.mssqltips.com/sqlservertip/1467/populate-a-sql-server-column-with-a-sequential-number-not-using-an-identity /.现在,我已经为您完成了工作,学习如何使用Google.
Ed
Yeah I suggest using Google - it will solve this basic issue for you. Here is the link you need to solve your problem - http://www.mssqltips.com/sqlservertip/1467/populate-a-sql-server-column-with-a-sequential-number-not-using-an-identity/. Now that I''ve done your work for you, learn how to use Google.
Ed


这篇关于给我一个更新专栏的想法.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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