java – ^ 1在SQL调用中意味着什么?

weixin_38059644 2019-09-12 12:32:33
SELECT LOWER(pla_lan_code) as locale, pla_auto_translate_opt_out_flag^1 as autoTranslationEnabled, pte_manual_edit_flag^1 as autoTranslated, ftr_created_date as queuedDate, ftr_translation_date as translationDate, ftr_engine as translationEngine, ftr_id as translationId, pla_auto_translate_opt_out_flag as translationOptOut SELECT * FROM property_languages (nolock) LEFT OUTER JOIN properties_text_live (nolock) 此查询嵌入在Java代码中.我试图将其转换为存储过程.我想知道^ 1在SQL中等同于什么.
...全文
40 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38080355 2019-09-12
  • 打赏
  • 举报
回复
这不是标准的SQL.在Transact-SQL(用于MS SQL Server和Sybase)中,^是bitwise exclusive-OR operator. 1 ^ 1为0,0 ^ 1为1. 如果原始int将0存储为false而1存储为true,则XORing为1会反转原始标志的意义. 猜测pla_auto_translate_opt_out_flag是一个int,其中1表示选择输出,0表示启用自动转换,使用运算符返回1表示启用,0表示选择退出.

476

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧