Explain Codes LogoExplain Codes Logo

Sql

Postgres: How to do Composite keys?

sql
data-integrity
constraints
composite-keys

Sql Query Distinct with Row_Number

sql
prompt-engineering
best-practices
performance

Use current date as default value for a column

sql
default-values
database-integrity
schema-management

How to Return Rows from Left Table Not Found in Right Table?

sql
join
performance
best-practices

Table Naming Dilemma: Singular vs. Plural Names

sql
database-design
naming-conventions
sql-best-practices

How do I query SQL for the latest record date for each user

sql
prompt-engineering
join
performance

Using an Alias column in the where clause in PostgreSQL

sql
prompt-engineering
best-practices
join

Merge two rows in SQL

sql
join
aggregate-functions
subqueries

Do I need to create indexes on foreign keys on Oracle?

sql
database-indexing
foreign-keys
oracle-performance

Sql Server: Making all UPPER case to Proper Case/Title Case

sql
prompt-engineering
best-practices
performance

How can I create a unique constraint on my column (SQL Server 2008 R2)?

sql
unique-constraint
sql-server
database-design

Get records with max value for each group of grouped SQL results

sql
subquery
window-functions
sql-optimization

Is it better to create an index before filling a table with data, or after the data is in place?

sql
index-creation
database-performance
data-loading

How to insert a value that contains an apostrophe (single quote)?

sql
sql-injection
parameterized-queries
orm

How to skip certain database tables with mysqldump?

sql
mysqldump
database-backup
sql-commands

Primary key/foreign Key naming convention

sql
best-practices
database-design
naming-conventions

How do I convert a database row into a struct

sql
database-mapping
struct-conversion
sql-null-values

How to Concatenate Numbers and Strings to Format Numbers in T-SQL?

sql
null-value-management
data-type-casting
error-handling

Clustered vs Non-Clustered

sql
index-design
performance-tuning
database-administration

How to do INSERT into a table records extracted from another table

sql
insert-into-select
sql-queries
data-aggregation