{"id":13363,"date":"2026-03-31T10:08:32","date_gmt":"2026-03-31T02:08:32","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=13363"},"modified":"2026-03-31T10:08:35","modified_gmt":"2026-03-31T02:08:35","slug":"gbase-8a%e7%9a%84%e8%84%b1%e6%95%8f%e5%88%97%e5%9c%a8where%e8%bf%87%e6%bb%a4%e6%97%b6%e6%98%af%e5%8e%9f%e5%a7%8b%e8%bf%98%e6%98%af%e8%84%b1%e6%95%8f%e5%90%8e%e7%9a%84%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/13363","title":{"rendered":"When filtering with a `WHERE` clause on a de-sensitized column in GBase 8a, is the data original or de-sensitized?"},"content":{"rendered":"<p>GBase 8a cluster supports data masking to ensure the security of sensitive data. Regarding filtering with WHERE clauses, grouping, and other operations on masked data, are these operations performed on the original data or on the masked data?<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b1561f2b44\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b1561f2b44\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83\" >\u6d4b\u8bd5\u73af\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%E5%85%A8%E8%A1%A8%E6%9F%A5%E8%AF%A2\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\u5168\u8868\u67e5\u8be2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7where%E7%AD%89%E5%80%BC%E6%9F%A5%E8%AF%A2%E8%84%B1%E6%95%8F%E5%88%97\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237where\u7b49\u503c\u67e5\u8be2\u8131\u654f\u5217<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7group_by%E8%84%B1%E6%95%8F%E5%88%97\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237group by\u8131\u654f\u5217<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E7%94%A8update%E8%BF%81%E7%A7%BB%E8%84%B1%E6%95%8F%E5%88%97%E6%95%B0%E6%8D%AE\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u7528update\u8fc1\u79fb\u8131\u654f\u5217\u6570\u636e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E7%94%A8insert_select_%E8%BD%AC%E5%82%A8%E8%84%B1%E6%95%8F%E5%88%97%E6%95%B0%E6%8D%AE\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u7528insert select \u8f6c\u50a8\u8131\u654f\u5217\u6570\u636e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E5%AF%B9%E8%84%B1%E6%95%8F%E5%88%97%E6%8E%92%E5%BA%8F\" >\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u5bf9\u8131\u654f\u5217\u6392\u5e8f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.gbase8.cn\/en\/13363\/#%E6%80%BB%E7%BB%93\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.gbase8.cn\/en\/2215\/?hilite=%E8%84%B1%E6%95%8F\">\u5357\u5927\u901a\u7528GBase 8a\u8131\u654f\u529f\u80fd\u4f7f\u7528\u6837\u4f8b<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83\"><\/span>\u6d4b\u8bd5\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4e00\u4e2a\u5355\u5217\u7684\u6570\u5b57\u7c7b\u578b\u7684\u8868\uff0c\u7528\u7684\u662f\u9ed8\u8ba4\u8131\u654f\u7b56\u7565\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>CREATE TABLE \"testmask\" (\n  \"id\" int(11) DEFAULT NULL MASKED WITH(FUNCTION='DEFAULT()')\n)<\/code><\/pre>\n\n\n\n<p>\u8868\u91cc\u9762\u6709\u51e0\u884c\u6d4b\u8bd5\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> select * from t_enc2;\n+------+\n| id   |\n+------+\n|    1 |\n|    2 |\n|    3 |\n|    4 |\n|   99 |\n+------+\n5 rows in set (Elapsed: 00:00:00.00)\n\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%E5%85%A8%E8%A1%A8%E6%9F%A5%E8%AF%A2\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\u5168\u8868\u67e5\u8be2<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230id\u5217\u5168\u90e8\u53d8\u6210\u4e860\uff0c\u770b\u4e0d\u5230\u539f\u59cb\u6570\u636e\uff0c\u7b26\u5408\u8131\u654f\u7684\u9884\u671f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> select * from testmask;\n+------+\n| id   |\n+------+\n|    0 |\n|    0 |\n|    0 |\n|    0 |\n|    0 |\n+------+\n5 rows in set (Elapsed: 00:00:00.02)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7where%E7%AD%89%E5%80%BC%E6%9F%A5%E8%AF%A2%E8%84%B1%E6%95%8F%E5%88%97\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237where\u7b49\u503c\u67e5\u8be2\u8131\u654f\u5217<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u9488\u5bf9id=1\u7684\u6761\u4ef6\uff0c\u8fd4\u56de\u4e86\u4e00\u884c\u7ed3\u679c\u7ea7\u3002 \u4ece\u7ed3\u679c\u770b\uff0c\u867d\u7136id\u663e\u793a\u4e3a0\uff0c\u4f46\u5b9e\u9645\u4e0a\u6267\u884cSQL\u7684\u7528\u6237\u5df2\u7ecf\u731c\u5230\u4e86id\u4e3a1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> select * from testmask where id=1;\n+------+\n| id   |\n+------+\n|    0 |\n+------+\n1 row in set (Elapsed: 00:00:00.01)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7group_by%E8%84%B1%E6%95%8F%E5%88%97\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237group by\u8131\u654f\u5217<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ece\u7ed3\u679c\u770b\uff0c\u8131\u654f\u5217\u7684group\u7528\u7684\u662f\u539f\u59cb\u6570\u636e<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> select id%3,count(*) from testmask group by id%3;\n+------+----------+\n| id%3 | count(*) |\n+------+----------+\n|    0 |        2 |\n|    0 |        1 |\n|    0 |        2 |\n+------+----------+\n3 rows in set (Elapsed: 00:00:00.09)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E7%94%A8update%E8%BF%81%E7%A7%BB%E8%84%B1%E6%95%8F%E5%88%97%E6%95%B0%E6%8D%AE\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u7528update\u8fc1\u79fb\u8131\u654f\u5217\u6570\u636e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ece\u7ed3\u679c\u770b\uff0cupdate\u5230\u65b0\u5217\u7684\u6570\u636e\uff0c\u662f\u8131\u654f\u540e\u7684\u6570\u636e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> alter table testmask add column id2 int;\nQuery OK, 5 rows affected (Elapsed: 00:00:00.15)\nRecords: 5  Duplicates: 5  Warnings: 0\n\ngbase> update testmask set id2=id;\nQuery OK, 5 rows affected (Elapsed: 00:00:00.07)\nRows matched: 5  Changed: 5  Warnings: 0\n\ngbase> select * from testmask;\n+------+------+\n| id   | id2  |\n+------+------+\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n+------+------+\n5 rows in set (Elapsed: 00:00:00.01)\n<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b\u8868\u7ed3\u6784\uff0c\u6ca1\u6709\u8131\u654f\u5c5e\u6027\uff0c\u8868\u793a\u6570\u636e\u5e93\u5185\u4fdd\u5b58\u7684id2\u5c31\u662f0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> show create table testmask;\n+----------+--------------------------------------+\n| Table    | Create Table                                                                                                                                                                            |\n+----------+------------------------------------------------+\n| testmask | CREATE TABLE \"testmask\" (\n  \"id\" int(11) DEFAULT NULL MASKED WITH(FUNCTION='DEFAULT()'),\n  \"id2\" int(11) DEFAULT NULL\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' |\n+----------+--------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E7%94%A8insert_select_%E8%BD%AC%E5%82%A8%E8%84%B1%E6%95%8F%E5%88%97%E6%95%B0%E6%8D%AE\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u7528insert select \u8f6c\u50a8\u8131\u654f\u5217\u6570\u636e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u8f6c\u50a8\u51fa\u53bb\u7684\u6570\u636e\u662f\u8131\u654f\u540e\u7684\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> create table testmask2 as select * from testmask;\nQuery OK, 5 rows affected (Elapsed: 00:00:00.19)\n\ngbase> select * from testmask2;\n+------+------+\n| id   | id2  |\n+------+------+\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n|    0 |    0 |\n+------+------+\n5 rows in set (Elapsed: 00:00:00.00)\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%97%A0%E8%84%B1%E6%95%8F%E6%9D%83%E9%99%90%E7%94%A8%E6%88%B7%EF%BC%8C%E5%AF%B9%E8%84%B1%E6%95%8F%E5%88%97%E6%8E%92%E5%BA%8F\"><\/span>\u65e0\u8131\u654f\u6743\u9650\u7528\u6237\uff0c\u5bf9\u8131\u654f\u5217\u6392\u5e8f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase> select rowid,t.* from testmask t order by id desc;\n+-------+------+------+\n| rowid | id   | id2  |\n+-------+------+------+\n|     4 |    0 |    0 |\n|     3 |    0 |    0 |\n|     2 |    0 |    0 |\n|     1 |    0 |    0 |\n|     0 |    0 |    0 |\n+-------+------+------+\n5 rows in set (Elapsed: 00:00:00.03)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%80%BB%E7%BB%93\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ece\u5982\u4e0a\u51e0\u4e2a\u6d4b\u8bd5\u7ed3\u679c\u53ef\u4ee5\u5f97\u51fa\u5982\u4e0b\u7ed3\u8bba<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8131\u654f\u5217\u4f5c\u4e3a\u6295\u5f71\u5217\u8fd4\u56de\u7ed9\u5e94\u7528\u65f6\uff0c\u4f1a\u88ab\u8131\u654f<\/li>\n\n\n\n<li>\u8131\u654f\u5217\u4f5c\u4e3a\u6295\u5f71\u5217\u8f6c\u50a8\u5230\u5176\u5b83\u5217\u6216\u5176\u5b83\u8868\u65f6\uff0c\u4f1a\u88ab\u8131\u654f<\/li>\n\n\n\n<li>\u8131\u654f\u5217\u4f5c\u4e3a\u975e\u6295\u5f71\u5217\uff0c\u6bd4\u5982where\u8fc7\u6ee4\uff0cgroup, order\u7b49\u65f6\uff0c\u4e0d\u4f1a\u88ab\u8131\u654f\uff0c\u800c\u662f\u539f\u6587\u53c2\u4e0e<\/li>\n<\/ul>\n\n\n\n<p>\u67e5\u770b\u4e86\u4e00\u4e0boracle\u7684\u00a0Data Redaction Policies \u529f\u80fd\uff0c\u7ed3\u679c\u4e00\u6837\u3002\u4ec5\u5728\u6570\u636e\u8fd4\u56de\u7ed9\u5e94\u7528\u65f6\uff0c\u6267\u884c\u8fd9\u4e2a\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/asoag\/configuring-oracle-data-redaction-policies.html#GUID-78CBB015-A3C3-42B9-8EFA-315C4789C749\">https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/asoag\/configuring-oracle-data-redaction-policies.html#GUID-78CBB015-A3C3-42B9-8EFA-315C4789C749<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"426\" src=\"https:\/\/www.gbase8.cn\/wp-content\/uploads\/2026\/03\/5d629640a568efba65a75697593395d6.png\" alt=\"\" class=\"wp-image-13364\" srcset=\"https:\/\/www.gbase8.cn\/wp-content\/uploads\/2026\/03\/5d629640a568efba65a75697593395d6.png 989w, https:\/\/www.gbase8.cn\/wp-content\/uploads\/2026\/03\/5d629640a568efba65a75697593395d6-600x258.png 600w, https:\/\/www.gbase8.cn\/wp-content\/uploads\/2026\/03\/5d629640a568efba65a75697593395d6-300x129.png 300w, https:\/\/www.gbase8.cn\/wp-content\/uploads\/2026\/03\/5d629640a568efba65a75697593395d6-768x331.png 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>GBase 8a cluster supports data masking to ensure the security of sensitive data. Regarding filtering with WHERE clauses, grouping, and other operations on masked data, are these operations performed on the original data or on the masked data?<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[76],"class_list":["post-13363","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-76"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=13363"}],"version-history":[{"count":1,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13363\/revisions"}],"predecessor-version":[{"id":13365,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13363\/revisions\/13365"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=13363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=13363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=13363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}