Explain Codes LogoExplain Codes Logo

Sql

Sql query for finding records where count > 1

sql
performance
best-practices
indexing

Update if different/changed

sql
update-optimization
sql-optimization-techniques
database-performance

What is the difference between a stored procedure and a view?

sql
views
stored-procedures
database-performance

Multiple SQL statements in one roundtrip using Dapper.NET

sql
database-operations
dapper-net
query-multiple

Sql Server - How to lock a table until a stored procedure finishes

sql
lock-escalation
deadlocks
transaction-management

How do I get just the date when using MSSQL GetDate()?

sql
date-extraction
datetime
sql-server

Using column alias in WHERE clause of MySQL query produces an error

sql
subquery
alias
sql-optimization

Convert timestamp to date in Oracle SQL

sql
timestamp-conversion
date-formatting
oracle-sql

Group BY + CASE statement

sql
best-practices
join
sql-queries

How to count the number of occurrences for all different values in a database column?

sql
best-practices
performance
dataframe

What is the purpose of using WHERE 1=1 in SQL statements?

sql
dynamic-queries
orm-patterns
performance-optimization

Sql Query - Concatenating Results into One String

sql
string-aggregation
performance-optimization
sql-best-practices

How do I use ROW_NUMBER()?

sql
prompt-engineering
join
paging

Best way to work with transactions in MS SQL Server Management Studio

sql
transaction-engineering
sql-server
best-practices

Mysql "NOT IN" query

sql
join
best-practices
performance

Sort the rows according to the order specified in WHERE IN clause

sql
case-statements
sql-sorting
custom-order

How to include a PHP variable inside a MySQL statement

sql
sql-injection
prepared-statements
pdo

What is the meaning of <> in MySQL query?

sql
join
best-practices
database

How to get the difference in years between two dates in SQL?

sql
timestampdiff
datediff
sql-performance

Does Dapper support the like operator?

sql
parameterization
sql-injection
database-behavior