mysql语法,hive语法,presto语法
时间: 2023-10-17 20:37:06 浏览: 101
hive客户端安装_hive客户端安装_hive_
MySQL语法:
1. 创建数据库:CREATE DATABASE database_name;
2. 创建表:CREATE TABLE table_name (column1 datatype, column2 datatype);
3. 插入数据:INSERT INTO table_name (column1, column2) VALUES (value1, value2);
4. 查询数据:SELECT column1, column2 FROM table_name WHERE condition;
5. 更新数据:UPDATE table_name SET column1 = value1 WHERE condition;
6. 删除数据:DELETE FROM table_name WHERE condition;
HiveSQL语法:
1. 创建数据库:CREATE DATABASE database_name;
2. 创建表:CREATE TABLE table_name (column1 datatype, column2 datatype) STORED AS file_format;
3. 插入数据:INSERT INTO table_name (column1, column2) VALUES (value1, value2);
4. 查询数据:SELECT column1, column2 FROM table_name WHERE condition;
5. 更新数据:UPDATE table_name SET column1 = value1 WHERE condition;
6. 删除数据:DELETE FROM table_name WHERE condition;
PrestoSQL语法:
1. 创建表:CREATE TABLE table_name (column1 datatype, column2 datatype);
2. 插入数据:INSERT INTO table_name (column1, column2) VALUES (value1, value2);
3. 查询数据:SELECT column1, column2 FROM table_name WHERE condition;
4. 更新数据:UPDATE table_name SET column1 = value1 WHERE condition;
5. 删除数据:DELETE FROM table_name WHERE condition;
6. 其他操作:JOIN、GROUP BY、ORDER BY等。
阅读全文