Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Sql testing queries

CREATE TABLE mytables(id INT identity(1,1) ,colName NVARCHAR(255));
INSERT INTO mytables(colName)
VALUES('***');
INSERT INTO mytables(colName)
VALUES('bla');

BEGIN TRANSACTION
DELETE FROM myTables
WHERE colName = '***';
SELECT * FROM myTables; -- Result #1
ROLLBACK TRANSACTION

SELECT * FROM myTables; -- Result #2
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Sql #testing #queries
ADD COMMENT
Topic
Name
2+3 =