Explain Codes LogoExplain Codes Logo

Sql

How to add 'ON DELETE CASCADE' in ALTER TABLE statement

sql
best-practices
data-integrity
referential-integrity

Get the latest date from grouped MySQL data

sql
join
best-practices
performance

What is the syntax for an inner join in LINQ to SQL?

sql
join
linq
sql-server

How to count the number of instances of each foreign-key ID in a table?

sql
join
performance
best-practices

Select Row number in postgres

sql
window-functions
row-number
pagination

How to insert an empty line to SQL table?

sql
database-management
data-insertion
sql-commands

How to get the next auto-increment ID in MySQL

sql
best-practices
data-integrity
sql-injection

Sql - IF EXISTS UPDATE ELSE INSERT INTO

sql
upsert
sql-injection
database-connections

Mysql CONCAT returns NULL if any field contain NULL

sql
null-handling
concat-function
coalesce-function

How can I change NULL to 0 when getting a single value from a SQL function?

sql
prompt-engineering
best-practices
data-type-compatibility

How do I copy data from one table to another in postgres using copy command

sql
data-transfer
copy-command
postgres

Database Design for Tagging

sql
database-design
query-optimization
indexing

Implement paging (skip / take) functionality with this query

sql
pagination
database-performance
best-practices

Identity_insert is set to OFF - How to turn it ON?

sql
identity-insert
sql-best-practices
data-migration

How to select last 6 months from news table using MySQL

sql
datetime
performance
best-practices

Generating random strings with T-SQL

sql
prompt-engineering
best-practices
performance

Why does NULL = NULL evaluate to false in SQL server

sql
null-comparison
three-valued-logic
best-practices

How to use DISTINCT and ORDER BY in same SELECT statement?

sql
sql-standards
subqueries
joins

What's the difference between TRUNCATE and DELETE in SQL

sql
transaction-logs
redo-undo-data
bulk-operations

Select a column in SQL not in Group By

sql
join
subqueries
ctes