Explain Codes LogoExplain Codes Logo

Sql

How to use order by with union all in SQL?

sql
union-all
order-by
sql-optimization

What is SELF JOIN and when would you use it?

sql
self-join
join-conditions
data-manipulation

Sql Server: Find out default value of a column with a query

sql
default-values
sql-server
database-management

How to use user variables in MySQL LIKE clause?

sql
sql-injection
prepared-statements
variable-assignment

How to drop all tables from a database with one SQL query?

sql
database-management
sql-queries
data-architecture

How to Identify port number of SQL server

sql
server-logs
sql-server-configuration
network-configuration

How to extract hour from query in postgres

sql
database-performance
sql-functions
timestamp-handling

How to create timestamp column with default value 'now'?

sql
default-values
timestamp
sql-queries

Return 0 if field is null in MySQL

sql
prompt-engineering
best-practices
performance

How to do a Postgresql subquery in select clause with join in from clause like SQL Server?

sql
subqueries
join
performance

Naming convention for unique constraint

sql
best-practices
database-design
constraint-naming

How to increment an integer column's value by 1 in SQL

sql
update
increment
sql-queries

How to use index in select statement?

sql
indexing
database-performance
query-optimization

Duplicating a TABLE using Microsoft SQL Server Management

sql
prompt-engineering
best-practices
data-integrity

Cannot access field in Big Query with type ARRAY>

sql
prompt-engineering
array-manipulation
bigquery

Group by minimum value in one field while selecting distinct rows

sql
prompt-engineering
best-practices
performance

How do I return rows with a specific value first?

sql
advanced-sorting
performance-optimization
sql-indexes

Is it possible for SQL Output clause to return a column not being inserted?

sql
advanced-data-capturing
merge-statement
output-clause

Creating an index on a table variable

sql
indexing-strategies
sql-server
performance-optimization

How can I group time by hour or by 10 minutes?

sql
prompt-engineering
interview-preparation
best-practices