SQL> SELECT COUNT(*) AS total_customers FROM SH.CUSTOMERS;
复制代码
用自然语言查询数据库
可以用自然语言和数据库举行沟通,语法:“select ai 自然语言”。
SQL> select ai how many customers exist;
复制代码
让数据库用自然语言复兴
用自然语言表明底层SQL命令的输出,语法:“select ai narrate自然语言”。 统计SH.CUSTOMERS表里有多少客户:
SQL> select ai narrate how many customers exist;
复制代码
统计前三名旧金山客户:
SQL> select ai narrate what are the top 3 customers in San Francisco;
复制代码
不会写SQL怎么办?不用担心,SELECT AI可以主动天生SQL语句!
用自然语言天生SQL
可以用自然语言天生SQL语句,语法:“select ai showsql 自然语言”。
SQL> select ai showsql how many customers exist;
复制代码
统计旧金山的客户有多少已婚的:
SQL> select ai showsql how many customers in San Francisco are married;
复制代码
统计旧金山的客户有多少已婚的,并表明统计的逻辑:
SQL> select ai explainsql how many customers in San Francisco are married;
复制代码
用SELECT AI辅助其他工作
比方:我想知道什么是Autonomous Database?
SQL> select ai chat what is Autonomous Database;
复制代码
比方:让SELECT AI帮写一段热情的弁言,介绍怎样开始以运动员为目标受众的攀岩运动。
SQL> SELECT AI chat Write an enthusiastic introductory paragraph on how to get started with rock climbing with Athletes as the target audience;
复制代码
总结
数据库技术正在向智能化方向发展,数据库和AI技术的结合,提高了数据库管理的效率和准确性。
文章参考
1、甲骨文官网:《Use Select AI to Generate SQL from Natural Language Prompts》
2、甲骨文云技术《Oracle Database 23ai 正式发布》
3、AIGC_Connect博客:《Oracle Select AI 介绍》 欢迎关注我的公众号《IT小Chen》