SQL Note
SQL Note
-- Update a record
UPDATE Employees
SET Department = 'Finance'
WHERE EmployeeID = 2;
-- Delete a record
DELETE FROM Employees
WHERE EmployeeID = 1;
OUTPUT :-
===================================================================================
==========================================
SELECT: Retrieve data from one or more tables.
INSERT: Add new records into a table.
UPDATE: Modify existing records in a table.
DELETE: Remove records from a table.
CREATE: Create new tables, views, or other database objects.
ALTER: Modify existing database objects.
DROP: Delete tables, views, or other database objects.
-----------------------------------------------------------------------------------
-------------------------
SELECT: Retrieves data from one or more tables.
Example:
SELECT column1, column2 FROM table_name;
--------------------------------------------------------------------------------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
JOIN: Combines records from two or more tables based on a related column between
them.
Example:
SELECT column1, column2 FROM table1 INNER JOIN table2 ON table1.column =
table2.column;
-----------------------------------------------------------------------------------
-
GROUP BY: Groups rows that have the same values into summary rows.
Example:
SELECT column1, COUNT(column2) FROM table_name GROUP BY column1;
-----------------------------------------------------------------------------------
---
-----------------------------------------------------------------------------------
--
-----------------------------------------------------------------------------------
---
-----------------------------------------------------------------------------------
----
-----------------------------------------------------------------------------------
----
These are some of the fundamental keywords in SQL,
but there are many more depending on the specific functionality and
features supported by the SQL dialect of your chosen RDBMS (Relational Database
Management System).