SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

Sql queries interview questions
Sql queries interview questionsSql queries interview questions
Sql queries interview questions
Pyadav010186
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
maha tce
 

Destacado (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
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 

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