在Oracle数据库中,常用的SQL查询语句包括:
- 查询所有数据:
SELECT * FROM table_name;
- 筛选特定字段:
SELECT column1, column2 FROM table_name;
- 条件查询:
SELECT * FROM table_name WHERE column_name = 'value';
- 排序查询:
SELECT * FROM table_name ORDER BY column_name [ASC|DESC];
- 分组查询:
SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name;
- 连接查询:
SELECT * FROM table1 t1 JOIN table2 t2 ON t1.id = t2.id;
- 子查询:
SELECT * FROM table_name WHERE column_name IN (SELECT column_name FROM another_table);
- 更新数据:
UPDATE table_name SET column_name = 'new_value' WHERE condition;
- 删除数据:
DELETE FROM table_name WHERE condition;
这些SQL语句是Oracle数据库中最常用的查询和操作方法,涵盖了查询、更新和删除等基本功能。