REAL-TIME

VBA Projects

Full Access with Source Code

  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

120+ PROFESSIONAL

Project Management Templates

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Effortlessly Manage Your Projects

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

Share Post

SQL Commands will help Analyst to create database,creating new tables and views, update or deleting the existing data. SQL commands help to fetch the data from the database and format it to required standards and summarize to perform analysis.

SQL Data Manipulation Language – DML Commands

The Data Manipulation Language (DML) is used to insert and modify database information.
Different DML statements includes:

–INSERT: to add records into the table
–UPDATE: to change column value in the table
–DELETE: to remove rows from the table

DML -INSERT Query

SQL INSERT statement allows to insert single or multiple records into the tale.

Syntax

[code language=”sql”] INSERT INTO table
(column-1,column-2,…column-n)
(value-1, value-2, … value-n);

Example

The following example insert a new record into Employee table,[code language=”sql”] INSERT INTO Employee(EID, Department, Name, Salary)
VALUES( 11,’HR’, ‘MICHAEL’,35000);

DML -UPDATE Query

UPDATE QUERY is used to update existing records in the table.

Syntax

[code language=”sql”] UPDATE table SET column1=value1,column2=value2… WHERE condition;

Example

The following example update the Mike’s salary to 35000 in the Employee table,[code language=”sql”] UPDATE Employee SET Salary= 35000 WHERE Name = ‘Mike’;

DML -DELETE Query

DELETE QUERY is used to delete selected rows,or all rows from the table.

Syntax

[code language=”sql”] DELETE from table WHERE condition;

Example

The following example dlete the record where EID equals to 10 from the Employee table,[code language=”sql”] DELETE from Employee WHERE EID=10;

SQL Data Definition Language – DDL commands

The Data Definition Language (DDL) is used to create and destroy databases and database objects.

These commands are:
–CREATE: to create a new data structure.
–ALTER: to change an existing data structure.
–DROP: to remove an entire data structure.
–TRUNCATE : to remove all rows from table.
–RENAME : to rename existing table.

CREATE

SQL command that adds a new table or View to an SQL database. Tables are a basic unit of organization and storage of data in SQL.

Syntax:[code lanuage=”sql”] CREATE TABLE <table_name> (
<column_name1> <datatype1> <constraint1>
<column_name2> <datatype2> <constraint2>
<constraint-list>
) ;

ALTER

SQL command can be used to add, modify, or drop a column from the existing table or to rename a table.

Syntax:[code lanuage=”sql”] Alter table <table name> add <column name><data type>;

DROP

The SQL command that removes the entire table.

Syntax:[code lanuage=”sql”] Drop <table name>;

Note: Before table drop must remove the dependent constraints

TRUNCATE

The SQL command that removes the entire table.

Syntax:[code lanuage=”sql”] TRUNCATE table <table name>;

RENAME

The SQL command that removes the entire table.

Syntax:[code lanuage=”sql”]

ALTER TABLE table_name RENAME TO new_table_name;

SQL Data Control Language – DCL commands

Data Control Language provides database administrators with the ability to grant users database permissions, revoke permissions previously granted .

Twp types of DCL commands are:Grant and Revoke.

GRANT

To allow specified users to perform specified tasks.[code language=”sql”] SYNTAX:-GRANT [privilege]ON [object]TO [user][WITH GRANT OPTION]

REVOKE:

Removes user access rights or privileges to the database objects.[code language=”sql”] REVOKE [GRANT OPTION FOR] [permission]ON [object]FROM [user]

SQL Transaction Control Language – TCL commands

SQL Transaction Control Language commands are used for managing changes affecting the data.

These commands are COMMIT, ROLLBACK and SAVEPOINT.

COMMIT :

Save or enable DML changes to the database.

Syntax:[code language=”sql”] COMMIT;

ROLLBACK:

To undo DML changes till in a transaction.

Syntax:[code language=”sql”] ROLLBACK SavePoint-Name;

SAVEPOINT:

To divide a transaction.

Syntax:[code language=”sql”] SAVEPOINT SavePoint-Name;

Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Categories: SQLTags: Last Updated: February 13, 2013

One Comment

  1. Sanjay gupta April 5, 2016 at 9:38 PM - Reply

    Hello i want to use DCL : Grant And Revoke In Sql Server 2012 , How Can I Use It tell Me….

Leave A Comment