SQL Clauses Documentation

Introduction

This page provides an overview of various SQL clauses, allowing users to explore and understand different SQL functionalities.

Clauses Overview

SQL provides a flexible framework for data manipulation. SQL Clauses are fundamental building blocks that enable various operations, such as data retrieval, insertion, updating, and deletion.

Clause List

Here's a list of common SQL clauses:

Clause Details

Let's dive deeper into one specific clause, SELECT. This clause lets you retrieve data from a database.

SELECT

Used to retrieve data from a database table. You specify the columns you want to retrieve.

Example: SELECT * FROM customers;

WHERE

Used to filter rows based on a condition. It's crucial for data selection.

Example: SELECT * FROM products WHERE price > 100;

ORDER BY

Sorts the results of a query. The order determines the presentation of the data.

Example: SELECT * FROM products ORDER BY price ASC;

INSERT

Adds a new row to a table.

Example: INSERT INTO products (name, price) VALUES ('Widget', 25);

UPDATE

Modifies existing rows in a table.

Example: UPDATE products SET price = 30 WHERE id = 1;

DELETE

Removes a row from a table.

Example: DELETE FROM products WHERE id = 1;