Explain Codes LogoExplain Codes Logo

Sql

Dbeaver, How to declare variables & use them?

sql
prompt-engineering
best-practices
sql-queries

Export result set on DBeaver to CSV

sql
export
csv
databases

Postgresql DISTINCT ON with different ORDER BY

sql
distinct-on
postgresql
sql-performance

How to create a composite primary key in SQL Server 2008

sql
primary-key
database-design
sql-server

Sql Server: Invalid Column Name

sql
sql-server
database-schema
error-handling

What's the fastest way to do a bulk insert into Postgres?

sql
bulk-insert
postgresql
performance-tuning

Why can't I use an alias for an aggregate in a having clause?

sql
subqueries
common-table-expressions
sql-server

What is the difference between a LATERAL JOIN and a subquery in PostgreSQL?

sql
join
subquery
performance

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