SyntaxStudy
Sign Up

Search results for "MySQL"

Found 25 results

Categories

Topics

Lessons

What is PHP?
PHP → PHP Introduction
What is PHP?PHP stands for PHP: Hypertext Preprocessor. It is a server-side scripting language embedded in HTML. PHP runs...
Introduction to PHP PDO
PHP → PHP PDO & MySQL
PHP PDOPDO (PHP Data Objects) is a database abstraction layer that provides a consistent interface for multiple database drivers. It is mo...
What is MySQL?
MySQL → SQL Introduction
What is MySQL?MySQL is the world's most popular open-source relational database management system (RDBMS), using structured query language...
MySQL Setup and Connection
MySQL → SQL Introduction
MySQL Setup and ConnectionConnecting via CLImysql -u root -p mysql -u username -p database_nameBasic Co...
Creating Tables
MySQL → SQL Introduction
Creating Tables in MySQLCREATE TABLECREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50...
MySQL Data Types
MySQL → SQL Introduction
MySQL Data TypesNumericTINYINT -- -128 to 127 SMALLINT -- -32768 to 32767 INT -- ~2 billion BIGINT -- ...
Basic Queries
MySQL → SQL Introduction
Basic MySQL QueriesINSERTINSERT INTO users (username, email, password) VALUES ('alice', 'alice@example.com', 'hashed_pw'...
Constraints
MySQL → SQL Introduction
MySQL ConstraintsConstraints enforce data integrity rules on columns.Types of Constraints-- PRIMARY KEY id INT AU...
SELECT and Filtering
MySQL → SQL SELECT
SELECT and Filtering in MySQLWHERE ClauseSELECT * FROM products WHERE price > 50; SELECT * FROM users WHERE status = 'ac...
Aggregate Functions
MySQL → SQL SELECT
Aggregate Functions in MySQLCOUNT, SUM, AVG, MIN, MAXSELECT COUNT(*) FROM users; SELECT COUNT(DISTINCT email) FROM users...
Subqueries
MySQL → SQL SELECT
Subqueries in MySQLA subquery is a query nested inside another query.In WHERE-- Users who made orders SELECT * FR...
Indexes
MySQL → SQL SELECT
MySQL IndexesIndexes speed up data retrieval but add overhead to writes.Creating Indexes-- Single column CREATE I...
INSERT Data
MySQL → SQL INSERT
INSERT in MySQLSingle RowINSERT INTO users (username, email, created_at) VALUES ('bob', 'bob@example.com', NOW());...
UPDATE and DELETE
MySQL → SQL INSERT
UPDATE and DELETE in MySQLUPDATEUPDATE users SET status = 'inactive' WHERE id = 5; UPDATE products SET price = price ...
Transactions
MySQL → SQL INSERT
MySQL TransactionsTransactions group SQL statements into an all-or-nothing unit.ACID PropertiesAtomicity...
Stored Procedures
MySQL → SQL INSERT
Stored Procedures in MySQLStored procedures are reusable SQL code blocks stored in the database.CreatingDELIMITER ...
Views
MySQL → SQL INSERT
MySQL ViewsA view is a saved query that acts like a virtual table.Creating a ViewCREATE VIEW active_users AS SELE...
INNER JOIN
MySQL → SQL Joins
INNER JOIN in MySQLINNER JOIN returns only rows with matching values in both tables.SyntaxSELECT columns FROM tab...
Advanced Query Patterns
MySQL → SQL Joins
Advanced MySQL Query PatternsWindow Functions (MySQL 8.0+)-- Row number per partition SELECT username, departm...
Query Optimization
MySQL → SQL Joins
MySQL Query OptimizationUse EXPLAINEXPLAIN SELECT * FROM orders WHERE user_id = 5 AND status = 'pending'; -- Check: typ...