Explain Codes LogoExplain Codes Logo

Sql

How do you write a conditional in a MySQL select statement?

sql
conditional-logic
mysql-queries
best-practices

Why should I capitalize my SQL keywords? Is there a good reason?

sql
best-practices
readability
sql-lexicon

What are the pros and cons to keeping SQL in Stored Procs versus Code

sql
best-practices
performance
debugging

How do I combine 2 select statements into one?

sql
subqueries
sql-queries
performance

What are valid table names in SQLite?

sql
database-design
sql-best-practices
sqlite

Check if MySQL table exists without using "select from" syntax?

sql
database-operations
performance-optimization
mysql-queries

Getting the current date in SQL Server?

sql
performance
best-practices
query-performance

Google spreadsheet "=QUERY" join() equivalent function?

sql
join
data-imports
performance

Scope of temporary tables in SQL Server

sql
performance
best-practices
sql-server

Postgresql INSERT FROM SELECT RETURNING ID

sql
prompt-engineering
best-practices
performance

Sql Server: how to add new identity column and populate column with ids?

sql
identity-column
data-integrity
sql-performance

Variable Value Assignment Using RETURNING Clause

sql
best-practices
error-handling
sql-operations

How to see the real SQL query in Python cursor.execute using pyodbc and MS-Access

sql
sql-injection
prepared-statements
exception-handling

How do I force Postgres to use a particular index?

sql
database-statistics
index-optimization
query-planner

How can I include null values in a MIN or MAX?

sql
null-values
min-max-aggregation
sql-queries

How do I decrease the size of my sql server log file?

sql
log-management
database-administration
performance-optimization

Is it necessary to use # for creating temp tables in SQL server?

sql
temp-tables
table-variables
sql-performance

How can I alter this computed column in SQL Server 2008?

sql
data-types
sql-server
computed-columns

Can there be constraints with the same name in a DB?

sql
best-practices
database-design
constraint-naming

Can a foreign key refer to a primary key in the same table?

sql
database-normalization
self-referencing-keys
foreign-key