SQL Script to find the missing indexes
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,240 reads
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,240 reads
In relational database, we store data in tabular form where data is divided into columns. Each column has a name...
2015-01-25
845 reads
Convert () function in SQL Server to convert an expression from one data type to another data type
Syntax for CONVERT function
CONVERT ( data_type [ ( length ) ] , expression...
2015-01-24
1,859 reads
One of the important task of any DBA is to find out all the jobs which are failed yesterday. Below...
2015-01-20
2,449 reads
Sometimes we need to find out how many stored procedures contains a given text. Below SQL query can be used...
2015-01-20
664 reads
Below is the SQL query which can be used to find out the tables which are created or modified on...
2015-01-20
649 reads
Sometimes we need to find out the size of the database on a server. Below SQL Scripts can be used...
2015-01-20
592 reads
Below query can be used to see the growth size of database files.
DECLARE @filename NVARCHAR(1000);
DECLARE @bc INT;
DECLARE @ec INT;
DECLARE @bfn...
2015-01-09
1,532 reads
Sometimes we need to check which tables of our database is highly populated. Below is the T-SQL Script which we...
2015-01-09
1,394 reads
Sometimes we needs to find out the last executed commands on the database server.
Below is the SQL script share by...
2015-01-08
1,950 reads
Do you know if your SQL Server is really running at its best? To...
You can find the slides of my session on the €100 DWH in Azure...
By Steve Jones
This value is something that I still hear today: our best work is done...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
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; goWhat is the result? See possible answers