This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE MyDB | |
Go | |
if exists (select 1 | |
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') | |
where r.fkeyid = object_id('"Order"') and o.name = 'FK_ORDER_REFERENCE_CUSTOMER') | |
alter table "Order" | |
drop constraint FK_ORDER_REFERENCE_CUSTOMER | |
go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF OBJECT_ID('tempdb..#NumbersArray') IS NOT NULL | |
DROP TABLE #NumbersArray | |
GO | |
--Create T-SQL version of number array look-like | |
CREATE TABLE #NumbersArray | |
( | |
ArrayIndex Int PRIMARY KEY CLUSTERED, | |
Value Int | |
) | |
GO |
NewerOlder