Viewing 15 posts - 1 through 15 (of 22 total)
https://learn.microsoft.com/en-us/sql/t-sql/functions/pwdcompare-transact-sql?view=sql-server-ver17
PWDCOMPARE (Transact-SQL)
Hashes a password and compares the hash to the hash of an existing password. PWDCOMPARE can be used to search for blank SQL Server login passwords or common weak...
October 13, 2025 at 2:01 pm
If you have a huge number of inserts and use Unique Identifiers, using NEWID() is better than IDENTITY
August 6, 2025 at 6:43 am
sp_delete_database_backuphistory [ @database_name = ] N'database_name'
July 31, 2024 at 7:36 am
JSON_OBJECT
https://learn.microsoft.com/en-us/sql/t-sql/functions/json-object-transact-sql?view=sql-server-ver16
Return value
Returns a valid JSON object string of nvarchar(max) type.
June 19, 2023 at 7:50 am
set ansi_null_dflt_ON OFF
create table TDfTest(i int)
insert into TDfTest values (NULL)
--Cannot insert the value NULL into column 'i', table 'test.dbo.TDfTest'; column does not allow nulls. INSERT fails.
February 17, 2023 at 11:07 am
the answer for val2[-3] is 3, and -3 is not equal to -2
January 18, 2023 at 2:33 pm
(SELECT FIRSTNAME
FROM EMPLOYEE
EXCEPT
SELECT FIRSTNAME
FROM PERSON)
UNION
(SELECT FIRSTNAME
FROM PERSON
EXCEPT
SELECT FIRSTNAME
FROM EMPLOYEE)
ORDER BY FIRSTNAME;
June 4, 2020 at 8:04 pm
between "WAITFOR DELAY '00:02.5': and "WAITFOR DELAY '00:02:00.5'" is the big difference
January 2, 2020 at 10:14 am
GO
CREATE procedure spt
as
SELECT C.CustomerID
FROM
(
SELECT
sh.CustomerID,
OrderDate = MAX(sh.OrderDate)
FROM dbo.SalesHeader AS sh
GROUP BY sh.CustomerID
) AS C
INNER JOIN C AS c2
ON C.CustomerID = c2.CustomerID;
GO
select * from sys.procedures p where p.name='spt'
GO
drop procedure if exists dbo.spt
GO
select...
November 8, 2019 at 8:15 am
REBUILD [ WITH (<rebuild_index_option> [ ,... n]) ]
Applies to: SQL Server (Starting with SQL Server 2012 (11.x)) and Azure SQL Database
Specifies the index will be rebuilt using the same columns, index type, uniqueness attribute,...
September 17, 2019 at 4:17 am
LOB storage - JSON documents can be stored as-is in NVARCHAR columns. This is the best way for quick data load and ingestion because the loading speed is matching loading of string columns....
August 19, 2019 at 6:47 am
The following shows the syntax of creating a DDL trigger:
CREATE TRIGGER trigger_name
ON { DATABASE | ALL SERVER}
[WITH ddl_trigger_option]
FOR {event_type | event_group }
AS {sql_statement}
April 25, 2019 at 5:52 am
In TabLockTable are as minimum two fields.
Insert Into TabLockTable Values ('Test TabLock') - syntax error
March 21, 2019 at 6:14 am
DECLARE @cars VARCHAR(200) = 'Porsche, Ferrari, Bentley, Jaguar,Range Rover'
SELECT *
FROM STRING_SPLIT(@cars, ', ')
please, remove last blank from separator
July 9, 2018 at 1:14 am
http://www.sqlservercentral.com/questions/Foreign+Keys+(FK)/144670/
CREATE TABLE #TableTest1 (
ID INT NOT NULL,
CONSTRAINT PK_ID1 PRIMARY KEY(ID)
);
CREATE TABLE TableTest2 (
ID INT NOT NULL
CONSTRAINT FK_TableTest1_ID FOREIGN KEY (ID) REFERENCES #TableTest1(ID)
);
INSERT INTO #TableTest1 (ID)
VALUES
(1);
INSERT INTO TableTest2 (ID)
VALUES
(2);
select * from...
August 16, 2016 at 5:07 am
Viewing 15 posts - 1 through 15 (of 22 total)