Sorting and limiting data

🔹 Sorting (ORDER BY) You use ORDER BY to arrange query results: SELECT column1, column2 FROM table_name ORDER BY column1 ASC; -- ascending (default) SELECT column1, column2 FROM table_name ORDER BY column1 ASC; -- ascending (default) SELECT column1, column2 FROM table_name ORDER BY column1 DESC; -- descending SELECT column1, column2 FROM table_name ORDER BY…

0 Comments

Querying data in SQL

Querying data in SQL usually means retrieving information from a database using the SELECT statement. Let me give you a structured overview with examples: 🔹 Basic Query SELECT column1, column2 FROM table_name; SELECT column1, column2 FROM table_name; SELECT → specifies the columns you want FROM → specifies the table Example: SELECT first_name, last_name FROM…

0 Comments

Filtering data in SQL

Filtering data in SQL is done mainly with the WHERE clause (and sometimes HAVING for aggregated results). It allows you to extract only the rows that meet certain conditions. Here’s a breakdown of the most common filtering techniques: 🔹 1. Basic Filtering with WHERE SELECT * FROM employees WHERE department = 'Sales'; SELECT *…

0 Comments

Modifying data in SQL

Modifying data in SQL typically involves changing existing records in a database. There are a few main SQL statements used for modifying data: UPDATE, DELETE, and sometimes INSERT (if adding new rows). Here’s a detailed breakdown: 1. UPDATE Used to modify existing records in a table. Syntax: UPDATE table_name SET column1 = value1, column2…

0 Comments

Operators in SQL

In SQL, operators are symbols or keywords used to perform operations on data, such as comparisons, arithmetic, logical checks, and pattern matching. They are used mainly in queries (e.g., inside the WHERE, SELECT, and HAVING clauses). Here’s a breakdown of the main types of SQL operators: 1. Arithmetic Operators Used for mathematical calculations. +…

0 Comments

Data Definition Language in SQL

In SQL, DDL stands for Data Definition Language. DDL is used to define, modify, and manage the structure of database objects such as tables, indexes, and schemas. Unlike DML (Data Manipulation Language), DDL focuses on the structure of the data rather than the data itself. Here are the main DDL commands in SQL: CREATEUsed…

0 Comments

Data types in SQL

In SQL, data types define the kind of values a column, variable, or parameter can hold. Different database systems (MySQL, PostgreSQL, SQL Server, Oracle, etc.) have slightly different sets, but they all fall into similar categories. Here’s a structured breakdown of common SQL data types: 1. Numeric Data Types Used to store numbers. Integer…

0 Comments

Spring Security Flow

🏗️ Detailed Spring Security Flow Schema [1] HTTP Request │ ▼ ┌───────────────────────────┐ │ Security Filter Chain │ │ (DelegatingFilterProxy) │ └───────────────────────────┘ │ ▼ +----------------------------+ | Example Filters in Chain: | | - SecurityContextPersistenceFilter (loads SecurityContext) | | - UsernamePasswordAuthenticationFilter (handles login form) | | - BasicAuthenticationFilter (for Basic Auth) | | - BearerTokenAuthenticationFilter (for…

0 Comments

Spring Boot Annoatations

1. @Autowired Used for dependency injection (Spring automatically injects the required bean). By default, it matches by type. @Component class Engine { public String start() { return "Engine started"; } } @Component class Car { @Autowired private Engine engine; public void drive() { System.out.println(engine.start() + " - Car is driving"); } } @Component class…

0 Comments

Resilience4j in Spring Boot

Spring Boot + Resilience4j is a popular combo for building fault-tolerant, resilient microservices.Resilience4j provides resilience patterns like: CircuitBreaker – prevents cascading failures by stopping calls when downstream is unhealthy. Retry – automatically retries failed calls. RateLimiter – limits number of requests. Bulkhead – limits concurrent calls. TimeLimiter – sets timeouts for calls. ✅ Step…

0 Comments

End of content

No more pages to load