SlideShare ist ein Scribd-Unternehmen logo
1 von 10
[SQL Tutorial – Part - 1]
by
[Speed4Career]
About Us:
 In modern days economic system the most
valuable asset is knowledge. Day by day
increasing competition and invention of
cutting edge technologies are the results of
revolution in the global Educational system
and use of process oriented learning
environment.
 This process oriented learning environment
is essential for the modern corporate world.
Speed4career.com understands the nature
of this revolution.
 We are committed to this process oriented
learning environment and set our goals to
help in creating a better modern corporate
world, more over a better world for our
future generation.
 In this quest for creating a process oriented
learning environment www.speed4career.com
introducing a new module – Tutorial.
 In this “Tutorial” module we are discussion
about the BEGINNERS lesson for the technology
related subjects.
 All the Tutorials are created by the INDUSTRY
EXPERTS working on the same field for years.
 For more details please visit:
www.speed4career.com/blog
SQL for Beginner – PART I
 About SQL:
 Collection of organized data called as
DATABASE. When we define, create, query
and update the database through software
then that system known as “Database
Management System” or “DBMS”. When we
want to manage all this things through
programming language then we use “SQL” or
“Structured Programming Language”.
 SQL was initially developed at IBM by Donald
D. Chamberlin and Raymond F. Boyce.
 Data Definition Language:
 Whenever you want to build or destroy or
altered any structure of database object at
that time whatever SQL commands we follow
those are inside of Data Definition
Language’s scope.
 SQL Commands:
1. Create – It will create an object in database.
2. Alter – It will alter required object in
database.
3. Drop – It will destroy the whole structure of
an object in database.
 Syntax:
1. CREATE table <table_name> (column_name
datatype,.....column_name datatype);
2. ALTER table <table_name>
add/modify/drop/rename column_name
datatype;
3. DROP table <table_name>
These are the examples of basic DDL SQL
commands. In advance SQL tutorial we will
give lots of other example.
So by this SQL command first we create a
table named “Speed4career_User_Details”
which has 5 columns.
 Command:
CREATE TABLE Speed4career_User_Details(
User_ID VARCHAR2(10),
User_Name VARCHAR2(200),
Address VARCHAR2(1000),
City VARCHAR2(100),
Postal_Code Number,
Country VARCHAR2(100),
Phn_number VARCHAR2(20));
[Note: - We are following Oracle SQL syntax for
this tutorial. SQL is NOT case sensitive]
Suppose you want to change the column
name “Postal_code” to “Zip_code” of this
table then you have to use ALTER command
to do this.
 Command:
ALTER TABLE Speed4career_User_Details
RENAME Postal_code TO Zip_code;
After change this now you want to add
another column “Special_User” in this table.
 Command:
ALTER TABLE Speed4career_User_Details
ADD Special_User VARCHAR2(1);
Now after doing this you feel that you want
to change the table name itself and want to
give new table name as
“Speed4career_Master_Details”.
 Command:
ALTER TABLE Speed4career_User_Details
RENAME TO Speed4career_Master_Details;
There are several more things you can do
with ALTER command.
Now you want to drop this table because you
don’t need this table anymore. So which
command you have to use?
Exactly “DROP” command.
 Command:
DROP TABLE Speed4career_User_Details;
• SQL INTERVIEW QUESTIONS:
1. What is SQL? What is the full form of SQL?
2. Which is the subset of SQL commands used
to manipulate Oracle Database Structures?
3. Example of CREATE TABLE.
4. What is the use of DROP option in the ALTER
TABLE command?
For more details please visit:
http://www.speed4career.com/blog/sql-for-beginne

Weitere ähnliche Inhalte

Andere mochten auch

Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answersiimjobs and hirist
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningeVideoTuition
 
Sql queries interview questions
Sql queries interview questionsSql queries interview questions
Sql queries interview questionsPyadav010186
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table1keydata
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manualmaha tce
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation LanguageJas Singh Bhasin
 
Computer science curriculum based on Program learning outcomes and objectives
Computer science curriculum based on Program learning outcomes and objectivesComputer science curriculum based on Program learning outcomes and objectives
Computer science curriculum based on Program learning outcomes and objectivesJawad Khan
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsqlSid Xing
 
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)Beat Signer
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsDataminingTools Inc
 

Andere mochten auch (19)

DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Best sql plsql material
Best sql plsql materialBest sql plsql material
Best sql plsql material
 
Dbms lab questions
Dbms lab questionsDbms lab questions
Dbms lab questions
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Sql queries interview questions
Sql queries interview questionsSql queries interview questions
Sql queries interview questions
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation Language
 
Computer science curriculum based on Program learning outcomes and objectives
Computer science curriculum based on Program learning outcomes and objectivesComputer science curriculum based on Program learning outcomes and objectives
Computer science curriculum based on Program learning outcomes and objectives
 
Dml and ddl
Dml and ddlDml and ddl
Dml and ddl
 
Oracle sql & plsql
Oracle sql & plsqlOracle sql & plsql
Oracle sql & plsql
 
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
Advanced SQL - Lecture 6 - Introduction to Databases (1007156ANR)
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
Sql queires
Sql queiresSql queires
Sql queires
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database Concepts
 

Kürzlich hochgeladen

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Kürzlich hochgeladen (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

SQL tutorial for beginners | Basic SQL Commands | SQL Syntax

  • 1. [SQL Tutorial – Part - 1] by [Speed4Career]
  • 2. About Us:  In modern days economic system the most valuable asset is knowledge. Day by day increasing competition and invention of cutting edge technologies are the results of revolution in the global Educational system and use of process oriented learning environment.  This process oriented learning environment is essential for the modern corporate world. Speed4career.com understands the nature of this revolution.  We are committed to this process oriented learning environment and set our goals to help in creating a better modern corporate world, more over a better world for our future generation.
  • 3.  In this quest for creating a process oriented learning environment www.speed4career.com introducing a new module – Tutorial.  In this “Tutorial” module we are discussion about the BEGINNERS lesson for the technology related subjects.  All the Tutorials are created by the INDUSTRY EXPERTS working on the same field for years.  For more details please visit: www.speed4career.com/blog
  • 4. SQL for Beginner – PART I  About SQL:  Collection of organized data called as DATABASE. When we define, create, query and update the database through software then that system known as “Database Management System” or “DBMS”. When we want to manage all this things through programming language then we use “SQL” or “Structured Programming Language”.  SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce.
  • 5.  Data Definition Language:  Whenever you want to build or destroy or altered any structure of database object at that time whatever SQL commands we follow those are inside of Data Definition Language’s scope.  SQL Commands: 1. Create – It will create an object in database. 2. Alter – It will alter required object in database. 3. Drop – It will destroy the whole structure of an object in database.
  • 6.  Syntax: 1. CREATE table <table_name> (column_name datatype,.....column_name datatype); 2. ALTER table <table_name> add/modify/drop/rename column_name datatype; 3. DROP table <table_name> These are the examples of basic DDL SQL commands. In advance SQL tutorial we will give lots of other example. So by this SQL command first we create a table named “Speed4career_User_Details” which has 5 columns.
  • 7.  Command: CREATE TABLE Speed4career_User_Details( User_ID VARCHAR2(10), User_Name VARCHAR2(200), Address VARCHAR2(1000), City VARCHAR2(100), Postal_Code Number, Country VARCHAR2(100), Phn_number VARCHAR2(20)); [Note: - We are following Oracle SQL syntax for this tutorial. SQL is NOT case sensitive] Suppose you want to change the column name “Postal_code” to “Zip_code” of this table then you have to use ALTER command to do this.
  • 8.  Command: ALTER TABLE Speed4career_User_Details RENAME Postal_code TO Zip_code; After change this now you want to add another column “Special_User” in this table.  Command: ALTER TABLE Speed4career_User_Details ADD Special_User VARCHAR2(1); Now after doing this you feel that you want to change the table name itself and want to give new table name as “Speed4career_Master_Details”.
  • 9.  Command: ALTER TABLE Speed4career_User_Details RENAME TO Speed4career_Master_Details; There are several more things you can do with ALTER command. Now you want to drop this table because you don’t need this table anymore. So which command you have to use? Exactly “DROP” command.  Command: DROP TABLE Speed4career_User_Details;
  • 10. • SQL INTERVIEW QUESTIONS: 1. What is SQL? What is the full form of SQL? 2. Which is the subset of SQL commands used to manipulate Oracle Database Structures? 3. Example of CREATE TABLE. 4. What is the use of DROP option in the ALTER TABLE command? For more details please visit: http://www.speed4career.com/blog/sql-for-beginne