-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
搭个网页应用,让ChatGPT帮我写SQL #70
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大家好,我是凌览。
开门见山,我搭了一个网页应用名字叫sql-translate。访问链接挂在我的个人博客(https://linglan01.cn/about)导航栏,也可以访问https://www.linglan01.cn/c/sql-translate/直达sql-translate。
它的主要功能有:人类语言转SQL、SQL转人类语言。文章演示一下人类语言转SQL。
show time!!!
人类语言转SQL
案例一
输入:
创建了一个名为"T_USERS"的表,包含了以下字段:
ChatGPT输出:
create TABLE T_USERS (id integer primary key, username varchar(50),email varchar(100),age integer gender varchar(10));
效果如此动图:
案例二
我设置Table Schema:
输入:在表名叫T_USERS 表上拓展添加学校、学历、就职公司字段
ChatGPT输出:
alteb table t_users add column school varchar(100), add column education varchar(100) add column company varchar(100);
效果如此动图:
案例三
输入:查询username为程序员凌览并且email为lanling@qq.com的所有数据
ChatGPT输出:
select * from t_users where username = '程序员凌览' and email = 'lanling@qq.com';
效果如此动图:
最后
无论你是初学者还是有经验的SQL用户,都可以来玩玩。我强烈推荐你尝试一下 sql-translate,少写点curd,早点下班不香吗?
The text was updated successfully, but these errors were encountered: