Explain Codes LogoExplain Codes Logo

Sql

Escape single quote character for use in an SQLite query

sql
sql-injection
prepared-statements
escape-sequences

Extract day of week from date field in PostgreSQL assuming weeks start on Monday

sql
database
postgresql
date-extraction

Calculating a running total in MySQL

sql
window-functions
performance
best-practices

Why can't I use alias in a count(*) "column" and reference it in a having clause?

sql
sql-operations
sql-alias
sql-having-clause

Running a .sql script using MySQL with JDBC

sql
database-population
jdbc
script-execution

How do you list the primary key of a SQL Server table?

sql
database-management
sql-server
primary-key

Select INTO USING UNION QUERY

sql
best-practices
data-migration
data-warehousing

What does SQL clause "GROUP BY 1" mean?

sql
group-by
sql-features
performance-optimization

Dbms_lob.getlength() vs. length() to find blob size in oracle

sql
blob
oracle
database

Distinct for only one column

sql
prompt-engineering
best-practices
join

Comparing SQL and Prolog

sql
turing-completeness
predicate-logic
relational-calculus

Sql WHERE column = everything

sql
dynamic-sql
sql-tricks
null-values

Find duplicate entries in a column

sql
fuzzy-matching
performance-considerations
analytical-functions

Sort by Minimum Value of Two Columns

sql
best-practices
performance
sql-performance

My Select SUM query returns null. It should return 0

sql
null-values
aggregate-functions
coalesce

What is the simplest SQL Query to find the second largest value?

sql
prompt-engineering
best-practices
join

Maintaining order in MySQL "IN" query

sql
performance
best-practices
indexing

Select * EXCEPT

sql
dynamic-sql
sql-injection
database-security

Adding a new SQL column with a default value

sql
database-management
sql-queries
data-types

Will ANSI JOIN vs. non-ANSI JOIN queries perform differently?

sql
join
best-practices
query-plans