Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.

Choosing between Common Table Expressions (CTEs) and subqueries in SQL Server depends on readability, maintainability, and performance. Subqueries are ideal for simpler, single-use cases, while CTEs excel in complex, modular, or recursive queries.

This article demonstrates how to create a SQL Server stored procedure for server-side pagination, searching, and sorting. The procedure efficiently handles large datasets by dynamically calculating total rows, applying filters, and sorting data.

This SQL script dynamically creates a table in SQL Server by utilizing INFORMATION_SCHEMA and system views. It constructs the table definition, including columns, data types, constraints, and default values.

The query processor in a DBMS is pivotal, handling DML and DDL queries through stages like compilation, linking, and optimization. It ensures efficient execution, supporting operations like SELECT, INSERT, UPDATE, and DELETE while maintaining database integrity and performance.

This article explains SQL Server collations, which dictate data sorting and comparison rules. It highlights case-sensitive (CS) and case-insensitive (CI) collations with practical SQL query examples. Learn how to use collations like Latin1_General_CS_AS and Latin1_General_CI_AS to manage case sensitivity in your data operations.

Explore the fundamentals of SQL with a focus on DDL (Data Definition Language) and DML (Data Manipulation Language). Learn how DDL commands define database structure and schema, while DML commands manipulate data within tables.

In this article, you will learn how to fix to sql server error 1069 - the service did not start due to a login failure.

This article discusses the SQL Server installation --- Basic

This article describes the process of installation of SQL Server.

Recover deleted SQL Server table data by restoring a full backup with NORECOVERY and applying transaction log backups using fn_dblog and LSN information.

This article is to discuss how to recover one table from a backup file

In this article,you will learn how to clone database or tables from one instance to another in SQL Server.

This article is to use of Transaction Log to Recover the Deleted or Modified Data. The SQL Server Transaction Log plays an important role in recovering deleted or modified data if you mistakenly perform a DELETE or UPDATE operation with the wrong condition or badly without filtration condition. This can be achieved by listening to the records stored inside the SQL Server Transaction Log file.

Effective error handling in T-SQL (Transact-SQL) is vital for managing unexpected issues in database operations. Using TRY-CATCH blocks, RAISEERROR, and error functions like ERROR_MESSAGE and ERROR_NUMBER, developers can catch and handle errors gracefully.

Learn how to convert varbinary data to Base64 strings in SQL Server using XML functions and the CAST method. This tutorial provides clear steps and SQL examples for encoding binary data, crucial for web applications needing text-based transmission of images and files.

Learn how to optimize SQL queries for better performance with our guide on "SQL: Writing Efficient Queries." Discover techniques for improving query speed, such as indexing strategies, query optimization tips, and best practices.

UNION ALL in SQL Server is a powerful command used to combine the result sets of two or more SELECT statements, including all duplicate rows. This guide covers the syntax, usage, and practical examples of using UNION ALL.

Understanding Synonyms in SQL Server" delves into the concept and implementation of synonyms within SQL Server. This guide covers how to create, use, and manage synonyms to simplify SQL queries, improve code readability, and streamline database administration.

Learn how these powerful functions operate within SQL queries to assign ranking values based on specified criteria, enhancing your ability to analyze and manipulate data efficiently in relational databases.

Discover SQL Server's IDENTITY columns for automatic unique number generation. Learn to create tables with IDENTITY, insert data without specifying IDs, seed values with DBCC CHECKIDENT, manage explicit ID insertions with IDENTITY_INSERT, and reset identity seeds using TRUNCATE TABLE.

To identify the version of SQL Server running, use the query SELECT @@VERSION AS 'SQL Server Version';. This returns detailed information including version number, edition (like Developer Edition), and details about the operating system it runs on, such as Windows Server 2019 Standard.

This guide covers techniques to query and display table names, row counts, column counts, and data sizes efficiently. Ideal for database administrators and developers seeking to optimize data management and performance analysis.

Learn how to implement Transparent Data Encryption (TDE) in SQL Server, including master keys, certificates, database encryption keys, backups, and key management.

Find SQL Server procedures, views, and triggers whose definitions reference a specified table using syscomments and sysobjects.

Primary Key and Unique Key Constraints in database management ensure data integrity and uniqueness. A Primary Key ensures each row is unique and not null, with only one per table. Unique Keys also ensure uniqueness but can include nulls and multiple constraints per table. Both support indexing and relationships.

SQL Server 2016 introduces numerous features for enhanced database management, including Always Encryption for secure data storage, JSON support for data interchange, Row Level Security for access control, PolyBase for querying big data, Temporal Tables for versioning, Dynamic Data Masking for data privacy, and more.

Learn how to detect the current Cumulative Update or Service Pack installed on SQL Server using various methods like ServerProperty in T-SQL, SQL Server Management Studio, Configuration Manager, and PowerShell.

This article delves into the UNION operator in SQL Server, explaining its syntax and practical usage. You'll learn how to combine results from multiple SELECT statements into a single result set, avoiding duplicates.

IIF function in SQL, also known as "Immediate If," provides a concise way to perform conditional evaluations within queries. It allows SQL developers to return different values based on whether a specified condition is evaluated as true or false.

The SQL MERGE statement combines INSERT, DELETE, and UPDATE operations into a single query, synchronizing data between source and target tables based on key fields. This powerful command efficiently handles data modifications, ideal for maintaining Slowly Changing Dimensions (SCD) in data warehouses.
Everything on SQL Server, not only its articles: the SQL Server page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article