Creating a Simple Table to Test Triggers in SQL Server

Q

How To Create a Simple Table to Test Triggers in SQL Server?

✍: FYIcenter.com

A

If you want to follow other tutorial examples included in this collection, you need to run this SQL script to create a simple table called fyi_users:

USE FyiCenterData;
GO

DROP TABLE fyi_users;
GO

CREATE TABLE fyi_users (
  id INTEGER IDENTITY NOT NULL,
  name VARCHAR(80) NOT NULL,
  email VARCHAR(80) NULL,
  password VARCHAR(32) NULL
  );

INSERT INTO fyi_users (name) VALUES ('John King');
INSERT INTO fyi_users (name) VALUES ('Nancy Greenberg');
GO

fyi_users is created now with 2 records.

 

"CREATE TRIGGER" - Creating a DML Trigger in SQL Server

Basic Features of a Trigger in SQL Server

Creating and Managing Triggers in SQL Server

⇑⇑ SQL Server Database Tutorials

2016-10-25, 1317🔥, 0💬