如何选择一行数据作为一个数据集 我是想
(select a,b,c from dbo.a where a='XX' )A ------解决方案--------------------
DELETE 插入表 WHERE a='XX'
INSERT INTO 插入表 SELECT TOP 1
a ,
b ,
c
FROM dbo.a
WHERE a = 'XX'
或者
直接
update 插入表 set a=‘xx1’,b='XX1' where a='xx' ------解决方案-------------------- select top 1 * from (select a,b,c from dbo.a where a='XX' )A ------解决方案--------------------
SELECT * FROM (
SELECT a FROM a WHERE a = 'xxx' UNION ALL
SELECT b AS a FROM a WHERE a = 'xxx' UNION ALL
SELECT c AS a FROM a WHERE a = 'xxx' ) A