select 字段名 ..然后生成一张新表. SELECT 字段名 INTO [myl].[dbo].[TaxRate] from ttest.dbo.TaxRate; --无须建立TaxRate表.创建表并复制了记录.
没看懂,DD_001_info, bis , DD_050_info ,都是列名吗?还是一行数据?
update tb set b=a where 条件
DD_001_info, bis , DD_050_info ,是一列 name text INFO DD_001_info aaaaaaaaaaa NULL DD_001_input hhhhhhhhhhh NULL希望得到 name text INFO DD_001_info aaaaaaaaaaa NULL DD_001_input hhhhhhhhhhh aaaaaaaaaaa能给一具体的update吗? update tb set INFO = @text where 如何写
where name='DD_001_input' and text='hhhhhhhhhhh' and Info is null没主键的表,如果有完全相同的两行就没办法了,只能打开企业管理器自己去里面输了
alter table tb add id int identity 建一个 不就有 id 了改完后再把列删了alter table tb drop column id
SELECT 字段名 INTO [myl].[dbo].[TaxRate] from ttest.dbo.TaxRate; --无须建立TaxRate表.创建表并复制了记录.
name text INFO
DD_001_info aaaaaaaaaaa NULL
DD_001_input hhhhhhhhhhh NULL希望得到
name text INFO
DD_001_info aaaaaaaaaaa NULL
DD_001_input hhhhhhhhhhh aaaaaaaaaaa能给一具体的update吗?
update tb set INFO = @text
where 如何写
这办法不错,改完后实际上也不用删了,多了这么个列基本上不会影响其他程序使用这个表(如果有在另一个表添加行时在触发器上对这个表添加行,并取@@IDENTITY的除外)
解决了
update tb set INFO = @text
where ..=replace(..,_input,_..)