liquibase.harness.data.expectedSql.mssql.loadUpdateData.sql Maven / Gradle / Ivy
DECLARE @reccount integer
SELECT @reccount = count(*) FROM authors WHERE id = 1
IF @reccount = 0
BEGIN
INSERT INTO authors (id, first_name, last_name, email, birthdate, added) VALUES (1, 'Adam', 'Gods', '[email protected]', '1000-02-27', '2000-02-04T02:32:00')
END
ELSE
BEGIN
UPDATE authors SET added = '2000-02-04T02:32:00', birthdate = '1000-02-27', email = '[email protected]', first_name = 'Adam', last_name = 'Gods' WHERE id = 1
END
DECLARE @reccount integer
SELECT @reccount = count(*) FROM authors WHERE id = 7
IF @reccount = 0
BEGIN
INSERT INTO authors (id, first_name, last_name, email, birthdate, added) VALUES (7, 'Noah', 'Lamekhs', '[email protected]', '2000-02-27', '1994-12-10T01:00:00')
END
ELSE
BEGIN
UPDATE authors SET added = '1994-12-10T01:00:00', birthdate = '2000-02-27', email = '[email protected]', first_name = 'Noah', last_name = 'Lamekhs' WHERE id = 7
END
DECLARE @reccount integer
SELECT @reccount = count(*) FROM authors WHERE id = 8
IF @reccount = 0
BEGIN
INSERT INTO authors (id, first_name, last_name, email, birthdate, added) VALUES (8, 'Muhammad', 'Ibn Abdullah', '[email protected]', '3000-02-27', '2000-12-10T01:00:00')
END
ELSE
BEGIN
UPDATE authors SET added = '2000-12-10T01:00:00', birthdate = '3000-02-27', email = '[email protected]', first_name = 'Muhammad', last_name = 'Ibn Abdullah' WHERE id = 8
END
© 2015 - 2024 Weber Informatics LLC | Privacy Policy