oracle常用经典SQL查询有哪些
常用经典SQL查询包括:
1.查询指定表中的所有记录:
SELECT * FROM table_name;
2.查询指定表中的特定字段:
SELECT field1, field2, field3 FROM table_name;
3.根据条件查询指定表中的记录:
SELECT * FROM table_name WHERE condition;
4.对查询结果排序:
SELECT * FROM table_name ORDER BY field1, field2;
5.分组查询:
SELECT * FROM table_name GROUP BY field1, field2;
6.连接查询:
SELECT * FROM table_name1, table_name2 WHERE table_name1.field1 = table_name2.field2;
7.子查询:
SELECT * FROM table_name WHERE field1 IN (SELECT field1 FROM table_name2);
相关文章