Explain Codes LogoExplain Codes Logo

Sql

How to find column names for all tables in all databases in SQL Server

sql
database-management
sql-server
information-schema

Exec failed because the name not a valid identifier?

sql
sql-injection
dynamic-sql
performance-optimization

Mysql SELECT DISTINCT multiple columns

sql
distinct-values
sql-queries
database-performance

How to Select Top 100 rows in Oracle?

sql
rownum
fetch-first
oracle-12c

Oracle DateTime in Where Clause?

sql
date-format
oracle-sql
performance-optimization

Storing DateTime (UTC) vs. storing DateTimeOffset

sql
datetimeoffset
datetime
best-practices

If-then-else statements in postgresql

sql
prompt-engineering
best-practices
case-statements

Are soft deletes a good idea?

sql
data-integrity
database-performance
best-practices

Sql primary key: integer vs varchar

sql
data-integrity
database-design
primary-keys

Getting result of dynamic SQL into a variable for sql-server

sql
sql-injection
dynamic-sql
error-handling

Sql for ordering by number - 1,2,3,4 etc instead of 1,10,11,12

sql
sql-sorting
varchar-gotcha
conditional-cast

Transfer data from one database to another database

sql
data-transfer
sql-server-management-studio
database-migration

Using group by on two fields and count in SQL

sql
best-practices
group-by
count

Performance of Cross join with WHERE clause compared to Inner join

sql
performance-tuning
optimization
best-practices

Declare Variable for a Query String

sql
dynamic-sql
parameterized-queries
sql-injection

Sql JPA - Multiple columns as primary key

sql
composite-key
jpa
hibernate

Downsides to "WITH SCHEMABINDING" in SQL Server?

sql
best-practices
schema-binding
sql-server

How to retrieve records for the last 30 minutes in MS SQL?

sql
date-handling
performance-optimization
best-practices

How do you import a large MS SQL .sql file?

sql
import
performance
error-handling

Update one table with data from another

sql
join
best-practices
performance