We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 204bc98 commit 68953a4Copy full SHA for 68953a4
test/schema/sqlserver_specific_schema.rb
@@ -266,6 +266,21 @@
266
SELECT pk_col_one AS id_source, event_name FROM INSERTED
267
SQL
268
269
+
270
+ execute <<-SQL
271
+ CREATE TRIGGER instead_of_insert_trigger
272
+ ON pk_autopopulated_by_a_trigger_records
273
+ INSTEAD OF INSERT
274
+ AS
275
+ BEGIN
276
+ INSERT INTO pk_autopopulated_by_a_trigger_records (
277
+ [id]
278
+ )
279
+ SELECT ((COALESCE(MAX(pk_autopopulated_by_a_trigger_records.id), 0) + 1))
280
+ FROM pk_autopopulated_by_a_trigger_records
281
+ END
282
+ SQL
283
284
# Another schema.
285
286
create_table :sst_schema_columns, force: true do |t|
0 commit comments