database

SQLServerCentral Editorial

Formatting Dates and Times: The SQL Dialect Divide

  • Editorial

If you’ve ever had to format dates and times in SQL, you’ve probably come across one of the most jarring realities of working across platforms: every major RDBMS does it differently and sometimes confusingly.  What’s a TO_CHAR() in Oracle becomes FORMAT() or CONVERT() in SQL Server, and its sort of the same in PostgreSQL… but […]

4.67 (3)

You rated this post out of 5. Change rating

2025-07-11

163 reads

SQLServerCentral Article

Forget the Models, Your Data is the Secret Sauce for Generative AI

  • Article

Generative AI holds immense potential for businesses, but its success depends on the quality of your data. High-quality, strategically managed data is essential for building trustworthy, unique, and competitive AI applications. This article explores how AI leverages your data through embeddings, outlines best practices for data management, and emphasizes the importance of responsible AI development. By prioritizing data quality and effective management, you'll position your business to reap the full benefits of Generative AI and drive innovation.

4.75 (4)

You rated this post out of 5. Change rating

2024-02-21

2,954 reads

SQLServerCentral Article

SQL Window Functions Series: LAG() and LEAD()

  • Article

Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.

5 (3)

You rated this post out of 5. Change rating

2023-12-11

8,405 reads

SQLServerCentral Article

Different Ways to Populate the List of Tables

  • Article

This article shows how you can query different types of tables, based on certain criteria that may be important to you. A good list of basics for any database administrator that will help you find tables in your database.

5 (1)

You rated this post out of 5. Change rating

2023-10-06

1,782 reads

External Article

The SELECT Statement in Oracle

  • Article

The SELECT statement is used to retrieve information from a database. Following the execution of a SELECT statement, a tabular result is held in a result table (called a result set). It allows you to select the table columns depending on a set of criteria. In this article, I will introduce the basic SELECT statement fetching data from just one table.

2023-06-21

External Article

How to Automate Cross-Platform Database Development

  • Article

In order to focus on their primary task of developing databases, the development team need to automate as many as possible of the routine tasks that are essential for database delivery, such as testing, scripting, version control, documentation, code review, reporting and so on. This article gives some advice on how to do it, faced with the added challenge of needing to use several different relational databases.

2023-04-28

Blogs

The Book of Redgate: We Value Teams

By

This value is something that I still hear today: our best work is done...

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

Read the latest Blogs

Forums

Planning for tomorrow, today - database migrations

By John Martin

Comments posted to this topic are about the item Planning for tomorrow, today -...

Bottlenecks on SQL Server performance

By runarlan

We have a BI-application that connects to input tables on a SQL Server 2022...

Is there some good routines for updating SQL Server database objects with GitHub

By Rod at work

At work we've been getting better at writing what's known as GitHub Actions (workflows,...

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers