Creating Trigger in SQL Server Table

SQL Trigger
Trigger is a action which will perform when the table gets insert, update or delete. We can choose the options on what the trigger should get invoked and create the syntax as below

CREATE Trigger triggername
ON tblname
FOR INSERT,UPDATE,DELETE -- We can add or remove the criteria here
AS
BEGIN

-- Action steps needs to carried out should be given here.

END

Creating Trigger in SQL Server Table was last modified: November 15th, 2017 by Justin Antony

Basic SQL commands

Basic SQL commands

SELECT – To extract data from the database
UPDATE – updates data in the database
DELETE – deletes data from the database
INSERT INTO – inserts new data into the database

CREATE DATABASE – creates a new database
ALTER DATABASE – modifies a database
CREATE TABLE – creates a new table
ALTER TABLE – modifies a table
DROP TABLE – deletes a table

CREATE INDEX – creates an index
DROP INDEX – deletes an index

Basic SQL commands was last modified: October 1st, 2017 by Justin Antony

How to update table statistics in SQL ?

update table statistics

UPDATE STATISTICS

Updates query optimization statistics on a table or indexed view. Updating statistics ensures that queries compile with up-to-date statistics. This command causes queries to recompile.

How to update table statistics in SQL ? was last modified: October 1st, 2017 by Justin Antony