我有一张表Employee
,其中包含以下示例数据
ID Name Gender
1 Mary F
2 John M
3 Smith M
我想写一个更新查询,将性别设置为性别为F
的{{1}},并将性别设置为性别为M
的{{1}}。如何在单M
个查询中执行此操作?
答案 0 :(得分:1)
我们可以使用.streamContainer {
background: blue;
bottom: 0;
box-sizing: border-box;
height: calc(100% - 120px);
position: absolute;
transition: height 0.5s;
width: 80%;
}
.streamRatio {
background: red;
box-sizing: border-box;
display: block;
height: 0;
padding: 56.25% 0 0 0;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
}
.streamInner {
background: green;
bottom: 0;
height: 100%;
left: 0;
right: 0;
position: absolute;
top: 0;
}
表达式进行更新。
<强>查询强>
<div class="streamContainer">
<div class="streamRatio">
<div class="streamInner">
Content Goes Here
</div>
</div>
</div>
答案 1 :(得分:0)
您只需使用tessBaseAPI.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SPARSE_TEXT);
:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "QuestionsModel",
"type": "array",
"items": {
"type": "object",
"properties": {
"section_name": { "type": "string" },
"options" : { "type" : "array",
"items" : {
"type" : "object",
"properties" : {
"awshack" : {
"type" : "array",
"items" : { "type" : "string" }
}
}
}
}
}
}
}
答案 2 :(得分:0)
用例何时更新
update employee set Gender=(case when Gender='F' then 'M' else 'f' end)
where gender in ('M','F')