Technology Guruu

  • Home
  • Site Info
    • About Us
    • Disclaimer
    • Privacy Polacy
  • Home
  • Digital Marketing
    • SEO
    • SMM
    • SEM
  • Quotes
  • Technical
  • Java
  • .Net
    • C#.Net
    • ASP.Net
  • Keychains

Monday, 4 April 2016

DDL Commands in SQL-sql query tool

 Akansha     12:00:00     TechnicalQuestions     No comments   

SQL  DDL Commands

SQL is a Structured Query Language it is the Back End language we have the Front End languages are Java,C#.net,vb.Net,PHP etc and backend languages are MySQL,SQL Server,Oracle etc.All frontend languages are used for writing programming in frontend and backend are used for storing the data in database.In the below you are seen DDL Commands in SQL this Commands are very powerful and useful to all and this are basic steps to learn SQL.
sqlcommands
SQL Commands

Data Definition Language:  

These commands are used to create database or database objects like tables,views,triggers,stored procedures,etc.
In DDL we have 4 types of commands they are
1. Alter
2.Create
3.Drop
4.Truncate


*******Alter Command*******

1.Alter

* These commands are used to modify the structure of database or database object.
* By using alter command we can add a new column for the existing table.
* We can remove a column from the table.We can change the datatype of the column.

Syntax:- alter table tablename

Q)Write a query to add a new column for existing table?

Syn:-  alter table tablename add columnname datatype

Ex:- alter table emp add salary money

Q)Write a query to remove salary column from existing table?

Syn:-  alter table tablename drop column  columnname

Ex:-   alter table emp drop column salary

*******Drop Command*******

2.Drop

It is used to drop the database or database objects like tables.
Syntax for to drop a database

Syn:drop database databasename

Ex:-  drop database employee

Syntax for drop a table

Syn:   drop table tablename

Ex:-   drop table emp
*******Create Command*******

3.Create

By using this command we can create tables or databases. 
Syntax for create table

Syn:  create table tablename

Ex:- create table emp
Syntax for create database

Syn:   create database Databasename

Ex:-  create database employee 


*******Truncate Command*******

4.Truncate

Truncate will delete the table data but not the table structure.
Syntax for truncate the table

 Syn: truncate table tablename

Ex:- truncate table emp

 Q)What is the difference between drop and truncate?

Truncate will delete the table data but not the table structure.
Drop will delete the table data along with table structure.
We can insert the record in the table even though we can truncate the table.
We can not insert the record in the table once the table is Droped.

In this article you can find the detail description about DDL commands that commands will help you to prepare for the interviews.These topic is very important and easy topic and it is the most frequently asking topic in interview purpose.

Share With Your Friends in Social Media (Facebook, Twitter, Google Plus Etc...) if You Like Our Content And Feel Free To Comment.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • DDL Commands in SQL-sql query tool SQL  DDL Commands SQL is a Structured Query Language it is the Back End language we have the Front End languages are Java,C#.net,vb.Net,PHP et… Read More
  • Introduction of html-Html web page HTML is the web based language and easiest language we are easily understand we are designing our website on our own style through this language.In … Read More
  • Logical Programs in C#.net .Net is a frame work it is a software in this we are execute 64+ languages like C#.net,vb.net,Asp.net etc.Now a days every company develop projects … Read More
  • Logical C#.Net Program for ATM machine .Net is a frame work it is a software in this we are execute 64+ languages like C#.net,vb.net,Asp.net etc.Now a days every company develop projects … Read More
  • Example For Inheritance in C#.Net .Net is a frame work it is a software in this we are execute 64+ languages like C#.net,vb.net,Asp.net etc.Now a days every company develop projects … Read More
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • Love Failure Quotes and Sad valentines day Quotes
    We Love Someone is a easy process sometime takes long time to love someone love others within short period but anyway always love dependin...
  • Brief Description about Multicast Delegate
    Multicast delegate is an extension of normal delegate. It helps you to point more than one method at a single moment of time. Multicast ...
  • Top 10 valentine's day Quotes and Greetings wishes
    All Lovers have Anxiety in Valentines day because it is a festival to all lovers in these they enjoy a lot and celebrate the Valentine...
  • Missing My Friend Quotes : Friendship Day Quotes 2017
    Friends today my article about missing friends and moments with them. Here you are seen the best friendship quotes and some  feelings when...
  • Brief description about Delegates
    Introduction about delegates and why delegates are came the main purpose of delegates how to useful and what are the advantages and disadv...
  • Wonderful sayings about Life.
    I Believe Follow  Things(Life Quotes) I Believe I believe: ********** Believe in Life ********** That we don't have to chan...
  • Top 10 Words Of Encouragement and encouraging quotes
    Friends when you are depression mood everyone have some encouragement words that gives boost strength for You i feel these quotes helpful ...
  • Na Tanu Samjhawan Ki Song lyrics
    Na Tanu Samjhawan Ki Song Lyrics With English Translation Movie : Humpty Sharma ki Dulhaniya Song : Samjhawan Song Singer : Arijit ...
  • swami vivekananda best motivational Quotes
    Some Peoples are always have a negative thinking & bad mood their heart always filled with sadness & they are in depression mood.e...
  • Best Good Afternoon wishes greetings and quotes
    Top Most Good Afternoon Wishes Good Afternoon wishes are gives a relaxation in afternoon time.This wishing can be done between 12 to 3 p...

Categories

  • Entertainment (67)
  • TechnicalQuestions (58)
  • Quotes (11)
  • C#.Net (8)
  • Java (8)
  • ValentinesDay (4)
  • SEO (3)
  • Home
  • About Us
  • Disclaimer
  • Privacy Policy
  • Sitemap

Copyright © 2015-2017 Good Friends 5.All Rights Reserved• And Our Sitemap • All Logos and Trademark Belongs To Their Respective Owners•