Skip to main content

Posts

Showing posts from July, 2017

What are the difference between DDL, DML , DCL and TCL commands?

Database Command Types DDL Data Definition Language  (DDL) statements are used to define the database structure or schema.  -           CREATE - to create objects in the database -           ALTER - alters the structure of the database -           DROP - delete objects from the database -           TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed -           COMMENT - add comments to the data dictionary -           RENAME - rename an object DML Data Manipulation Language  (DML) statements are used for managing data in database. DML commands are not auto-committed. It means changes made by DML command are not permanent to d...

Create SQL Server Job in Easy Steps

J ob is a set of one or more management tasks. The SQL Server Agent service is managing SQL server jobs. SQL Server Agent is a windows service. This topic will help to beginners to create SQL Server Jobs in a easy steps. Install Sql Server Management Studio and Go SQL Server Agent. Purpose: Some time customer want to complete a specific action in periodically like “Daily”, “Weekly”, and “Monthly”. DBA can Backup database Log repor Data Synchronization (bad practice). Monitoring  For this tutorial, have created a store procedure that basically calculate “Total Sales Amount”, “Total Discount Amount”, “Total Product” for daily sales and insert this record into a table. For beginners, using “Northwind” database download from codeplex or Microsoft Create table DailySalesRecords to hold date wise total sale records . USE [NORTHWIND] GO CREATE TABLE [dbo].[DailySalesRecords]( [OrderDate] [datetime] NOT NULL , [TotalAmount] [ dec...