SQL:如何将一替换为二?
我有一个表“第一个”:
我正在尝试编写一个查询。
If first.type = 'MM'
then replace this line in two new lines
where first.type = 'HH' and first.type = 'VV'.
例如:first.type = 'MM':
我想像这样替换这一行:
结果:
有人知道如何做到这一点吗?
我正在使用 MS SQL Server Management Studio Express。
I have a table "first":
I am trying to write a query.
If first.type = 'MM'
then replace this line in two new lines
where first.type = 'HH' and first.type = 'VV'.
For example : The line where first.type = 'MM':
I want to replace this line like that:
And the result:
Does someone have an idea on how this can be done?
I'm using MS SQL Server Management Studio Express.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该解决方案可能非常具体,因为它意味着
type
列只能具有值HH
、MM
或VV
。This solution is probably very specific in the sense that it implies that the
type
column can only have valuesHH
,MM
, orVV
.