6. Subqueries | View | Indexes | Performence tips
A subquery (also called a nested query or inner query) is a query written inside another SQL query.The subquery runs first it gives value then outer query use that value Subquery in WHERE - (add some
A subquery (also called a nested query or inner query) is a query written inside another SQL query.The subquery runs first it gives value then outer query use that value Subquery in WHERE - (add some
Aggregation FunctionsFunctions that perform calculations on a set of rows and return a single value. Function Description Example COUNT() Counts rows SELECT COUNT(*) FROM employees; SUM() Calc
In SQL, a JOIN is used to combine rows from two or more tables based on a related column.Example in Image: -- CREATE TABLE classes ( -- id INT PRIMARY KEY, -- class_name VARCHAR(50), -- teacher VARC
Boolean -> BOOLEAN/BOOL -> True/False valuesBinary -> BINARY(n) , VARBINARY(n) , BLOB (for files )Speacil -> ENUM-> fixed length of list DDL ( DATA define language)A category of SQL commands used to d
SELECT & FROMSELECT : Tells which col you want.FROM: Tell from which Table you want to fetch. //In Postgres default schema is public //In We have databse inside it we have schema inside it we have ta
What is Data and What is Strcutured Data ?Data - piece of information that can be stored and processed.Strcutured data - data that is organized in a predefined format so that it can be easily stored a