@@ -14,6 +14,17 @@ The most fundamental operations in SQL are known as CRUD, which stands for **Cre
1414
1515The ` SELECT ` statement is used to select data from a database. The data returned is stored in a result table.
1616
17+ ``` sql
18+ -- Select all columns from a table
19+ SELECT * FROM table_name;
20+ 21+ -- Select specific columns from a table
22+ SELECT column1, column2 FROM table_name;
23+ 24+ -- Select with a condition
25+ SELECT * FROM table_name WHERE condition;
26+ ```
27+ For example:
1728``` sql
1829-- Select all columns from a table named 'employees'
1930SELECT * FROM employees;
@@ -29,6 +40,19 @@ SELECT * FROM employees WHERE department = 'Sales';
2940## INSERT
3041The ` INSERT INTO ` statement is used to insert new records into a table.
3142
43+ ``` sql
44+ -- Insert into specific columns
45+ INSERT INTO table_name (column1, column2) VALUES (value1, value2);
46+ 47+ -- Insert into all columns
48+ INSERT INTO table_name VALUES (value1, value2, value3, ...);
49+ 50+ -- Insert multiple rows
51+ INSERT INTO table_name (column1, column2)
52+ VALUES (value1, value2), (value3, value4), (value5, value6);
53+ ```
54+ For example:
55+ 3256``` sql
3357-- Insert specific data into columns of a table named 'customers'
3458INSERT INTO customers (customer_name, email) VALUES (' John Doe' , ' john@example.com' );
0 commit comments