functions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
This skill is a comprehensive catalog of every idasql SQL function. Use it to look up any function signature, parameters, and usage.

本技能是一份包含所有idasql SQL函数的综合目录。可用于查询任意函数的签名、参数及用法。

Disassembly

反汇编

FunctionDescription
disasm_at(addr)
Canonical listing line for containing head (works for code/data)
disasm_at(addr, n)
Canonical listing line with +/-
n
neighboring heads
disasm(addr)
Single disassembly line at address
disasm(addr, n)
Next N instructions from address (count-based, not boundary-aware)
disasm_range(start, end)
All disassembly lines in address range [start, end)
disasm_func(addr)
Full disassembly of function containing address
make_code(addr)
Create instruction at address (returns 1 if already code or created)
make_code_range(start, end)
Create instructions in [start, end), returns number created
sql
SELECT disasm_at(0x401000);
SELECT disasm_at(0x401000, 2);
SELECT disasm_func(address) FROM funcs WHERE name = '_main';
SELECT disasm_range(0x401000, 0x401100);
SELECT disasm(0x401000);
SELECT disasm(0x401000, 5);
SELECT make_code(0x401000);
SELECT make_code_range(0x401000, 0x401100);
Function creation is table-driven (not a SQL function):
sql
INSERT INTO funcs (address) VALUES (0x401000);

函数描述
disasm_at(addr)
包含头部的标准列表行(适用于代码/数据)
disasm_at(addr, n)
包含头部的标准列表行及前后
n
个相邻头部
disasm(addr)
地址处的单行反汇编内容
disasm(addr, n)
从地址开始的后续N条指令(基于计数,不识别边界)
disasm_range(start, end)
地址范围[start, end)内的所有反汇编行
disasm_func(addr)
包含该地址的函数的完整反汇编内容
make_code(addr)
在地址处创建指令(若已为代码或创建成功则返回1)
make_code_range(start, end)
在[start, end)范围内创建指令,返回创建的数量
sql
SELECT disasm_at(0x401000);
SELECT disasm_at(0x401000, 2);
SELECT disasm_func(address) FROM funcs WHERE name = '_main';
SELECT disasm_range(0x401000, 0x401100);
SELECT disasm(0x401000);
SELECT disasm(0x401000, 5);
SELECT make_code(0x401000);
SELECT make_code_range(0x401000, 0x401100);
函数创建基于表驱动(并非SQL函数):
sql
INSERT INTO funcs (address) VALUES (0x401000);

Byte Access and Patching

字节访问与补丁

FunctionDescription
bytes(addr, n)
Read
n
raw bytes as hex string
bytes_raw(addr, n)
Read
n
bytes as BLOB
load_file_bytes(path, file_offset, address, size[, patchable])
Load bytes from a host file into IDB memory/file image
patch_byte(addr, val)
Patch one byte at
addr
(returns 1/0)
patch_word(addr, val)
Patch 2 bytes at
addr
(returns 1/0)
patch_dword(addr, val)
Patch 4 bytes at
addr
(returns 1/0)
patch_qword(addr, val)
Patch 8 bytes at
addr
(returns 1/0)
revert_byte(addr)
Revert one patched byte to original
get_original_byte(addr)
Read original (pre-patch) byte
sql
SELECT bytes(0x401000, 16);
SELECT patch_byte(0x401000, 0x90) AS ok;
SELECT bytes(0x401000, 1) AS current, get_original_byte(0x401000) AS original;
SELECT revert_byte(0x401000) AS reverted;
load_file_bytes(...)
is intended for file-driven bulk patching workflows. It returns
1
on success,
0
on failure.
For composable row-shaped reads or patching, use the pure
bytes
table:
SELECT ea, value FROM bytes WHERE ea >= :start AND ea < :end ORDER BY ea
. Use
heads
for item size/type metadata.

函数描述
bytes(addr, n)
读取
n
个原始字节并以十六进制字符串返回
bytes_raw(addr, n)
读取
n
个字节并以BLOB格式返回
load_file_bytes(path, file_offset, address, size[, patchable])
将主机文件中的字节加载到IDB内存/文件镜像中
patch_byte(addr, val)
addr
处补丁一个字节(返回1/0表示成功/失败)
patch_word(addr, val)
addr
处补丁2个字节(返回1/0表示成功/失败)
patch_dword(addr, val)
addr
处补丁4个字节(返回1/0表示成功/失败)
patch_qword(addr, val)
addr
处补丁8个字节(返回1/0表示成功/失败)
revert_byte(addr)
将已补丁的字节恢复为原始值
get_original_byte(addr)
读取原始(补丁前)字节
sql
SELECT bytes(0x401000, 16);
SELECT patch_byte(0x401000, 0x90) AS ok;
SELECT bytes(0x401000, 1) AS current, get_original_byte(0x401000) AS original;
SELECT revert_byte(0x401000) AS reverted;
load_file_bytes(...)
用于基于文件的批量补丁工作流。成功返回
1
,失败返回
0
如需组合式行状读取或补丁操作,请使用纯
bytes
表:
SELECT ea, value FROM bytes WHERE ea >= :start AND ea < :end ORDER BY ea
。 使用
heads
获取项的大小/类型元数据。

Binary Search

二进制搜索

Use the
byte_search
table for raw bytes/opcodes. It is table-shaped so results can be filtered, joined, grouped, and limited directly.
ColumnDescription
address
Match address
matched_hex
Matched bytes rendered as hex text
matched_bytes
Matched bytes as a BLOB
size
Match size in bytes
pattern
Hidden required input: IDA byte pattern
start_ea
Hidden optional inclusive lower bound
end_ea
Hidden optional exclusive upper bound
max_results
Hidden optional generator cap
Pattern syntax (IDA native):
  • "48 8B 05"
    - Exact bytes (hex, space-separated)
  • "48 ? 05"
    or
    "48 ?? 05"
    -
    ?
    = any byte wildcard (whole byte only)
  • "(01 02 03)"
    - Alternatives (match any of these bytes)
sql
SELECT address, matched_hex, size
FROM byte_search
WHERE pattern = '48 8B ? 00'
LIMIT 10;

SELECT printf('0x%llX', address) AS addr
FROM byte_search
WHERE pattern = 'CC CC CC'
ORDER BY address
LIMIT 1;
Optimization Pattern:
sql
-- Count unique functions containing RDTSC (opcode: 0F 31)
SELECT COUNT(DISTINCT f.address) as count
FROM byte_search b
JOIN funcs f ON b.address >= f.address AND b.address < f.end_ea
WHERE b.pattern = '0F 31';

使用
byte_search
表进行原始字节/操作码搜索。该表为表结构,因此结果可直接进行过滤、连接、分组和限制。
描述
address
匹配地址
matched_hex
匹配字节的十六进制文本形式
matched_bytes
匹配字节的BLOB格式
size
匹配结果的字节大小
pattern
隐藏必填输入:IDA字节模式
start_ea
隐藏可选参数:包含性下界
end_ea
隐藏可选参数:排他性上界
max_results
隐藏可选参数:结果数量上限
模式语法(IDA原生):
  • "48 8B 05"
    - 精确字节(十六进制,空格分隔)
  • "48 ? 05"
    "48 ?? 05"
    -
    ?
    = 任意字节通配符(仅适用于完整字节)
  • "(01 02 03)"
    - 可选值(匹配其中任意一组字节)
sql
SELECT address, matched_hex, size
FROM byte_search
WHERE pattern = '48 8B ? 00'
LIMIT 10;

SELECT printf('0x%llX', address) AS addr
FROM byte_search
WHERE pattern = 'CC CC CC'
ORDER BY address
LIMIT 1;
优化模式:
sql
-- 统计包含RDTSC(操作码:0F 31)的唯一函数数量
SELECT COUNT(DISTINCT f.address) as count
FROM byte_search b
JOIN funcs f ON b.address >= f.address AND b.address < f.end_ea
WHERE b.pattern = '0F 31';

Names & Functions

名称与函数

Use table lookups for address and containing-function metadata. Resolve symbol names to integer EAs before using these patterns.
PatternDescription
SELECT name FROM names WHERE address = :ea LIMIT 1
Name at address
SELECT name FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
Function containing address
SELECT address FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
Start of containing function
SELECT end_ea FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
End of containing function
Function count and index lookup are table-driven:
sql
SELECT COUNT(*) AS function_count FROM funcs;
SELECT address FROM funcs WHERE rowid = 0;

使用表查询获取地址和所属函数的元数据。在使用这些模式前,请将符号名称解析为整数EA。
模式描述
SELECT name FROM names WHERE address = :ea LIMIT 1
地址处的名称
SELECT name FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
包含该地址的函数
SELECT address FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
所属函数的起始地址
SELECT end_ea FROM funcs WHERE :ea >= address AND :ea < end_ea LIMIT 1
所属函数的结束地址
函数计数和索引查询基于表驱动:
sql
SELECT COUNT(*) AS function_count FROM funcs;
SELECT address FROM funcs WHERE rowid = 0;

Cross-References

交叉引用

Cross-reference edge queries are table-driven:
sql
SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE to_ea = 0x401000;

SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE from_ea = 0x401000;

SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE from_func = 0x401000;

交叉引用边查询基于表驱动:
sql
SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE to_ea = 0x401000;

SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE from_ea = 0x401000;

SELECT from_ea, to_ea, type, is_code, from_func
FROM xrefs
WHERE from_func = 0x401000;

Navigation

导航

Use
heads
ordering for defined-item navigation and SQLite formatting functions for display strings. Address equality/range filters are optimized;
ORDER BY address
or
ORDER BY address DESC
is consumed for next/previous-item lookups.
sql
SELECT address
FROM heads
WHERE address > 0x401000
ORDER BY address
LIMIT 1;

SELECT address
FROM heads
WHERE address < 0x401000
ORDER BY address DESC
LIMIT 1;

SELECT printf('0x%llx', address) AS address_hex
FROM heads
LIMIT 10;
Segment lookup is table-driven:
sql
SELECT name
FROM segments
WHERE 0x401000 >= start_ea
  AND 0x401000 < end_ea
LIMIT 1;

使用
heads
排序进行已定义项导航,使用SQLite格式化函数生成显示字符串。地址相等/范围查询已优化;
ORDER BY address
ORDER BY address DESC
可用于查找下一个/上一个项。
sql
SELECT address
FROM heads
WHERE address > 0x401000
ORDER BY address
LIMIT 1;

SELECT address
FROM heads
WHERE address < 0x401000
ORDER BY address DESC
LIMIT 1;

SELECT printf('0x%llx', address) AS address_hex
FROM heads
LIMIT 10;
段查询基于表驱动:
sql
SELECT name
FROM segments
WHERE 0x401000 >= start_ea
  AND 0x401000 < end_ea
LIMIT 1;

Comments

注释

Read comments through the
comments
table:
sql
SELECT COALESCE(NULLIF(comment, ''), NULLIF(rpt_comment, '')) AS comment
FROM comments
WHERE address = 0x401000
LIMIT 1;
Write comments through the table:
sql
INSERT INTO comments(address, comment) VALUES (0x401000, 'regular comment');
INSERT INTO comments(address, rpt_comment) VALUES (0x401000, 'repeatable comment');

通过
comments
表读取注释:
sql
SELECT COALESCE(NULLIF(comment, ''), NULLIF(rpt_comment, '')) AS comment
FROM comments
WHERE address = 0x401000
LIMIT 1;
通过表写入注释:
sql
INSERT INTO comments(address, comment) VALUES (0x401000, 'regular comment');
INSERT INTO comments(address, rpt_comment) VALUES (0x401000, 'repeatable comment');

Modification

修改

FunctionDescription
type_at(addr)
Read type declaration applied at address
set_type(addr, decl)
Apply C declaration/type at address (empty decl clears type;
addr
may be EA, numeric string, or symbol name)
parse_decls(text)
Import C declarations (struct/union/enum/typedef) into local types
Preferred SQL write surface for function metadata:
  • UPDATE funcs SET name = '...', prototype = '...' WHERE address = ...
  • INSERT INTO names(address, name) VALUES (..., '...')
    or
    UPDATE names SET name = '...' WHERE address = ...
  • prototype
    maps to
    type_at/set_type
    behavior and invalidates decompiler cache.
  • For per-call indirect-call typing, use
    apply_callee_type(call_ea, decl)
    from the decompiler surface.

函数描述
type_at(addr)
读取地址处应用的类型声明
set_type(addr, decl)
在地址处应用C语言声明/类型(空声明会清除类型;
addr
可以是EA、数字字符串或符号名称)
parse_decls(text)
将C语言声明(结构体/联合体/枚举/类型定义)导入本地类型
函数元数据的首选SQL写入方式:
  • UPDATE funcs SET name = '...', prototype = '...' WHERE address = ...
  • INSERT INTO names(address, name) VALUES (..., '...')
    UPDATE names SET name = '...' WHERE address = ...
  • prototype
    type_at/set_type
    行为关联,并会使反编译器缓存失效。
  • 如需为每个调用的间接调用设置类型,请使用反编译器接口中的
    apply_callee_type(call_ea, decl)

Python Execution

Python执行

FunctionDescription
idapython_snippet(code[, sandbox])
Execute Python snippet and return captured output text
idapython_file(path[, sandbox])
Execute Python file and return captured output text
Runtime guard:
sql
PRAGMA idasql.enable_idapython = 1;
sql
SELECT idapython_snippet('print("hello from idapython")');
SELECT idapython_file('C:/temp/script.py');
SELECT idapython_snippet('counter = globals().get("counter", 0) + 1; print(counter)', 'alpha');

函数描述
idapython_snippet(code[, sandbox])
执行Python代码片段并返回捕获的输出文本
idapython_file(path[, sandbox])
执行Python文件并返回捕获的输出文本
运行时防护:
sql
PRAGMA idasql.enable_idapython = 1;
sql
SELECT idapython_snippet('print("hello from idapython")');
SELECT idapython_file('C:/temp/script.py');
SELECT idapython_snippet('counter = globals().get("counter", 0) + 1; print(counter)', 'alpha');

Context Awareness (Plugin UI)

上下文感知(插件UI)

FunctionDescription
get_ui_context_json()
Return current UI/widget/context JSON for context-aware prompts (plugin-only)
sql
SELECT get_ui_context_json();

函数描述
get_ui_context_json()
返回当前UI/组件/上下文的JSON数据(仅插件可用)
sql
SELECT get_ui_context_json();

Item Analysis

项分析

Use
heads
for item classification, size, and raw flags:
sql
SELECT address, size, type, flags, disasm
FROM heads
WHERE address = 0x401000;

使用
heads
进行项分类、大小和原始标志的查询:
sql
SELECT address, size, type, flags, disasm
FROM heads
WHERE address = 0x401000;

Instruction Details

指令详情

Use
instructions
and
instruction_operands
for decoded instruction facts.
instruction_operands
exposes one row per non-void operand.
sql
SELECT address, itype, mnemonic
FROM instructions
WHERE func_addr = 0x401000
LIMIT 10;

SELECT opnum, text, type_code, type_name, value
FROM instruction_operands
WHERE address = 0x401000
ORDER BY opnum;

SELECT i.address, i.itype, i.mnemonic, i.size, o.opnum, o.text, o.type_name, o.value
FROM instructions i
LEFT JOIN instruction_operands o
  ON o.address = i.address AND o.address = 0x401000
WHERE i.address = 0x401000
ORDER BY o.opnum;

使用
instructions
instruction_operands
获取解码后的指令信息。
instruction_operands
为每个非空操作数提供一行数据。
sql
SELECT address, itype, mnemonic
FROM instructions
WHERE func_addr = 0x401000
LIMIT 10;

SELECT opnum, text, type_code, type_name, value
FROM instruction_operands
WHERE address = 0x401000
ORDER BY opnum;

SELECT i.address, i.itype, i.mnemonic, i.size, o.opnum, o.text, o.type_name, o.value
FROM instructions i
LEFT JOIN instruction_operands o
  ON o.address = i.address AND o.address = 0x401000
WHERE i.address = 0x401000
ORDER BY o.opnum;

Decompilation

反编译

FunctionDescription
decompile(addr)
PREFERRED — Full pseudocode with line prefixes
decompile(addr, 1)
Force re-decompilation (use after writes/renames)
apply_callee_type(call_ea, decl)
Apply a prototype to one indirect/dynamic call site
callee_type_at(call_ea)
Read explicit call-site prototype when present
call_arg_addrs(call_ea)
JSON array of persisted argument-loader instruction EAs
set_union_selection(func_addr, ea, path)
Set/clear union selection path at EA
set_union_selection_item(func_addr, item_id, path)
Set/clear union selection path by
ctree.item_id
set_union_selection_ea_arg(func_addr, ea, arg_idx, path[, callee])
PREFERRED call-arg targeting helper
call_arg_item(func_addr, ea, arg_idx[, callee])
Resolve call-arg coordinate to explicit
arg_item_id
ctree_item_at(func_addr, ea[, op_name[, nth]])
Resolve generic expression coordinate to
ctree.item_id
set_union_selection_ea_expr(func_addr, ea, path[, op_name[, nth]])
Set/clear union selection via expression coordinate
get_union_selection(func_addr, ea)
Read union selection path JSON at EA
get_union_selection_item(func_addr, item_id)
Read union selection path JSON by
ctree.item_id
get_union_selection_ea_arg(func_addr, ea, arg_idx[, callee])
Read union selection JSON via call-arg coordinate
get_union_selection_ea_expr(func_addr, ea[, op_name[, nth]])
Read union selection JSON via expression coordinate
set_numform(func_addr, ea, opnum, spec)
Set/clear numform by EA + operand index
get_numform(func_addr, ea, opnum)
Read numform JSON by EA + operand index
set_numform_item(func_addr, item_id, opnum, spec)
Set/clear numform by ctree item id
get_numform_item(func_addr, item_id, opnum)
Read numform JSON by ctree item id
set_numform_ea_arg(func_addr, ea, arg_idx, opnum, spec[, callee])
Set/clear numform via call-arg coordinate
get_numform_ea_arg(func_addr, ea, arg_idx, opnum[, callee])
Read numform JSON via call-arg coordinate
set_numform_ea_expr(func_addr, ea, opnum, spec[, op_name[, nth]])
Set/clear numform via expression coordinate
get_numform_ea_expr(func_addr, ea, opnum[, op_name[, nth]])
Read numform JSON via expression coordinate
Decompiler local and label mutation is table-driven:
  • List locals with
    SELECT idx, name, type, comment, size, is_arg, is_result, stkoff, mreg FROM ctree_lvars WHERE func_addr = ... ORDER BY idx
    .
  • Rename or comment locals with
    UPDATE ctree_lvars SET name = ...
    or
    comment = ...
    using
    func_addr
    plus a selected
    idx
    .
  • Rename labels with
    UPDATE ctree_labels SET name = ... WHERE func_addr = ... AND label_num = ...
    .

函数描述
decompile(addr)
推荐使用 — 带行前缀的完整伪代码
decompile(addr, 1)
强制重新反编译(在写入/重命名后使用)
apply_callee_type(call_ea, decl)
为单个间接/动态调用点应用原型
callee_type_at(call_ea)
读取调用点处的显式原型(若存在)
call_arg_addrs(call_ea)
持久化参数加载指令EA的JSON数组
set_union_selection(func_addr, ea, path)
在EA处设置/清除联合体选择路径
set_union_selection_item(func_addr, item_id, path)
通过
ctree.item_id
设置/清除联合体选择路径
set_union_selection_ea_arg(func_addr, ea, arg_idx, path[, callee])
推荐使用 调用参数定位助手
call_arg_item(func_addr, ea, arg_idx[, callee])
将调用参数坐标解析为明确的
arg_item_id
ctree_item_at(func_addr, ea[, op_name[, nth]])
将通用表达式坐标解析为
ctree.item_id
set_union_selection_ea_expr(func_addr, ea, path[, op_name[, nth]])
通过表达式坐标设置/清除联合体选择路径
get_union_selection(func_addr, ea)
读取EA处的联合体选择路径JSON数据
get_union_selection_item(func_addr, item_id)
通过
ctree.item_id
读取联合体选择路径JSON数据
get_union_selection_ea_arg(func_addr, ea, arg_idx[, callee])
通过调用参数坐标读取联合体选择路径JSON数据
get_union_selection_ea_expr(func_addr, ea[, op_name[, nth]])
通过表达式坐标读取联合体选择路径JSON数据
set_numform(func_addr, ea, opnum, spec)
通过EA + 操作数索引设置/清除数字格式
get_numform(func_addr, ea, opnum)
通过EA + 操作数索引读取数字格式JSON数据
set_numform_item(func_addr, item_id, opnum, spec)
通过ctree项ID设置/清除数字格式
get_numform_item(func_addr, item_id, opnum)
通过ctree项ID读取数字格式JSON数据
set_numform_ea_arg(func_addr, ea, arg_idx, opnum, spec[, callee])
通过调用参数坐标设置/清除数字格式
get_numform_ea_arg(func_addr, ea, arg_idx, opnum[, callee])
通过调用参数坐标读取数字格式JSON数据
set_numform_ea_expr(func_addr, ea, opnum, spec[, op_name[, nth]])
通过表达式坐标设置/清除数字格式
get_numform_ea_expr(func_addr, ea, opnum[, op_name[, nth]])
通过表达式坐标读取数字格式JSON数据
反编译器本地变量和标签修改基于表驱动:
  • 使用
    SELECT idx, name, type, comment, size, is_arg, is_result, stkoff, mreg FROM ctree_lvars WHERE func_addr = ... ORDER BY idx
    列出本地变量。
  • 使用
    UPDATE ctree_lvars SET name = ...
    comment = ...
    ,结合
    func_addr
    和选中的
    idx
    来重命名或注释本地变量。
  • 使用
    UPDATE ctree_labels SET name = ... WHERE func_addr = ... AND label_num = ...
    来重命名标签。

File Generation

文件生成

FunctionDescription
gen_listing(path)
Generate a full-database listing file (LST)
sql
SELECT gen_listing('C:/tmp/full.lst');

函数描述
gen_listing(path)
生成完整数据库列表文件(LST格式)
sql
SELECT gen_listing('C:/tmp/full.lst');

Graph Generation

图生成

FunctionDescription
gen_cfg_dot(addr)
Generate CFG as DOT graph string
gen_cfg_dot_file(addr, path)
Write CFG DOT to file
gen_schema_dot()
Generate database schema as DOT
sql
SELECT gen_cfg_dot(0x401000);
SELECT gen_schema_dot();

函数描述
gen_cfg_dot(addr)
生成控制流图(CFG)的DOT格式字符串
gen_cfg_dot_file(addr, path)
将CFG的DOT格式内容写入文件
gen_schema_dot()
生成数据库模式的DOT格式内容
sql
SELECT gen_cfg_dot(0x401000);
SELECT gen_schema_dot();

Entity Search (grep)

实体搜索(grep)

Canonical workflow guidance lives in
../grep/SKILL.md
.
SurfaceDescription
grep
table
Structured rows for composable SQL search
sql
SELECT name, kind, address FROM grep WHERE pattern = 'sub%' LIMIT 10;
SELECT name, kind, address FROM grep WHERE pattern = 'init' LIMIT 50 OFFSET 0;

标准工作流指南位于
../grep/SKILL.md
中。
接口描述
grep
结构化行数据,用于组合式SQL搜索
sql
SELECT name, kind, address FROM grep WHERE pattern = 'sub%' LIMIT 10;
SELECT name, kind, address FROM grep WHERE pattern = 'init' LIMIT 50 OFFSET 0;

String List Functions

字符串列表函数

FunctionDescription
rebuild_strings()
Rebuild with ASCII + UTF-16, minlen 5 (default)
rebuild_strings(minlen)
Rebuild with custom minimum length
rebuild_strings(minlen, types)
Rebuild with custom length and type mask
Type mask:
1
=ASCII,
2
=UTF-16,
4
=UTF-32,
3
=ASCII+UTF-16 (default),
7
=all. Use
COUNT(*) FROM strings
for the current string-list count without materializing string rows.
sql
SELECT COUNT(*) AS strings FROM strings;
SELECT rebuild_strings();
SELECT rebuild_strings(4);
SELECT rebuild_strings(5, 7);
函数描述
rebuild_strings()
使用ASCII + UTF-16、最小长度5(默认值)重建字符串列表
rebuild_strings(minlen)
使用自定义最小长度重建字符串列表
rebuild_strings(minlen, types)
使用自定义长度和类型掩码重建字符串列表
类型掩码:
1
=ASCII,
2
=UTF-16,
4
=UTF-32,
3
=ASCII+UTF-16(默认),
7
=所有类型。 使用
COUNT(*) FROM strings
获取当前字符串列表的数量,无需实例化字符串行。
sql
SELECT COUNT(*) AS strings FROM strings;
SELECT rebuild_strings();
SELECT rebuild_strings(4);
SELECT rebuild_strings(5, 7);