Submit Search
Upload
Sql seuence and sub queries
•
Download as DOCX, PDF
•
0 likes
•
52 views
P
pooja kumari
Follow
sql seuence and queries
Read less
Read more
Technology
Report
Share
Report
Share
1 of 9
Download now
Recommended
12c Mini Lesson - Invisible Columns
12c Mini Lesson - Invisible Columns
Connor McDonald
SQL techniques for faster applications
SQL techniques for faster applications
Connor McDonald
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tips
Connor McDonald
Sql
Sql
prabhuftz
Optimizing queries MySQL
Optimizing queries MySQL
Georgi Sotirov
data constraints,group by
data constraints,group by
Visakh V
Best sql plsql material
Best sql plsql material
pitchaiah yechuri
Flashback ITOUG
Flashback ITOUG
Connor McDonald
Recommended
12c Mini Lesson - Invisible Columns
12c Mini Lesson - Invisible Columns
Connor McDonald
SQL techniques for faster applications
SQL techniques for faster applications
Connor McDonald
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tips
Connor McDonald
Sql
Sql
prabhuftz
Optimizing queries MySQL
Optimizing queries MySQL
Georgi Sotirov
data constraints,group by
data constraints,group by
Visakh V
Best sql plsql material
Best sql plsql material
pitchaiah yechuri
Flashback ITOUG
Flashback ITOUG
Connor McDonald
Database Management System
Database Management System
Hitesh Mohapatra
UKOUG 2019 - SQL features
UKOUG 2019 - SQL features
Connor McDonald
Quick reference for cql
Quick reference for cql
Rajkumar Asohan, PMP
Sql ejercicio 1
Sql ejercicio 1
Jillian Motoharu
PHP Static Code Review
PHP Static Code Review
Damien Seguy
Explain
Explain
Ligaya Turmelle
Notes for SQLite3 Usage
Notes for SQLite3 Usage
William Lee
4sem dbms(1)
4sem dbms(1)
Karthik Sagar
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
Ronald Bradford
Connor McDonald 11g for developers
Connor McDonald 11g for developers
InSync Conference
Sql
Sql
ftz 420
ZFINDALLZPROGAM
ZFINDALLZPROGAM
Jay Dalwadi
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
Connor McDonald
Pdxpugday2010 pg90
Pdxpugday2010 pg90
Selena Deckelmann
Ruby closures, how are they possible?
Ruby closures, how are they possible?
Carlos Alonso Pérez
ANSI vs Oracle language
ANSI vs Oracle language
Connor McDonald
Les09
Les09
arnold 7490
Les11
Les11
arnold 7490
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019 - 10 great sql features
Connor McDonald
Slaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in Ruby
Jason Yeo Jie Shun
Plsql lab mannual
Plsql lab mannual
Harish Khodke
DBMS lab manual
DBMS lab manual
maha tce
More Related Content
What's hot
Database Management System
Database Management System
Hitesh Mohapatra
UKOUG 2019 - SQL features
UKOUG 2019 - SQL features
Connor McDonald
Quick reference for cql
Quick reference for cql
Rajkumar Asohan, PMP
Sql ejercicio 1
Sql ejercicio 1
Jillian Motoharu
PHP Static Code Review
PHP Static Code Review
Damien Seguy
Explain
Explain
Ligaya Turmelle
Notes for SQLite3 Usage
Notes for SQLite3 Usage
William Lee
4sem dbms(1)
4sem dbms(1)
Karthik Sagar
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
Ronald Bradford
Connor McDonald 11g for developers
Connor McDonald 11g for developers
InSync Conference
Sql
Sql
ftz 420
ZFINDALLZPROGAM
ZFINDALLZPROGAM
Jay Dalwadi
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
Connor McDonald
Pdxpugday2010 pg90
Pdxpugday2010 pg90
Selena Deckelmann
Ruby closures, how are they possible?
Ruby closures, how are they possible?
Carlos Alonso Pérez
ANSI vs Oracle language
ANSI vs Oracle language
Connor McDonald
Les09
Les09
arnold 7490
Les11
Les11
arnold 7490
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019 - 10 great sql features
Connor McDonald
Slaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in Ruby
Jason Yeo Jie Shun
What's hot
(20)
Database Management System
Database Management System
UKOUG 2019 - SQL features
UKOUG 2019 - SQL features
Quick reference for cql
Quick reference for cql
Sql ejercicio 1
Sql ejercicio 1
PHP Static Code Review
PHP Static Code Review
Explain
Explain
Notes for SQLite3 Usage
Notes for SQLite3 Usage
4sem dbms(1)
4sem dbms(1)
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
Connor McDonald 11g for developers
Connor McDonald 11g for developers
Sql
Sql
ZFINDALLZPROGAM
ZFINDALLZPROGAM
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
Pdxpugday2010 pg90
Pdxpugday2010 pg90
Ruby closures, how are they possible?
Ruby closures, how are they possible?
ANSI vs Oracle language
ANSI vs Oracle language
Les09
Les09
Les11
Les11
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019 - 10 great sql features
Slaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in Ruby
Similar to Sql seuence and sub queries
Plsql lab mannual
Plsql lab mannual
Harish Khodke
DBMS lab manual
DBMS lab manual
maha tce
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer Disasters
Connor McDonald
Finding SQL execution outliers
Finding SQL execution outliers
Maxym Kharchenko
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
willcoxjanay
MySQL Database System Hiep Dinh
MySQL Database System Hiep Dinh
webhostingguy
mysqlHiep.ppt
mysqlHiep.ppt
webhostingguy
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
coubroughcosta
MySql slides (ppt)
MySql slides (ppt)
webhostingguy
Relational DB Course
Relational DB Course
Sunny U Okoro
12c Mini Lesson - Better Defaults
12c Mini Lesson - Better Defaults
Connor McDonald
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
Farhan Aslam
Dbms lab Manual
Dbms lab Manual
Vivek Kumar Sinha
Best sql plsql_material for B.TECH
Best sql plsql_material for B.TECH
AmIt Prasad
12c Mini Lesson - Inline PLSQL from SQL
12c Mini Lesson - Inline PLSQL from SQL
Connor McDonald
Sql notes
Sql notes
Madipalli Krishna Chaitanya
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?
Andrej Pashchenko
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
Antony T Curtis
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
AnilManage
DBMS LAB
DBMS LAB
guru0070
Similar to Sql seuence and sub queries
(20)
Plsql lab mannual
Plsql lab mannual
DBMS lab manual
DBMS lab manual
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer Disasters
Finding SQL execution outliers
Finding SQL execution outliers
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
MySQL Database System Hiep Dinh
MySQL Database System Hiep Dinh
mysqlHiep.ppt
mysqlHiep.ppt
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
MySql slides (ppt)
MySql slides (ppt)
Relational DB Course
Relational DB Course
12c Mini Lesson - Better Defaults
12c Mini Lesson - Better Defaults
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
Dbms lab Manual
Dbms lab Manual
Best sql plsql_material for B.TECH
Best sql plsql_material for B.TECH
12c Mini Lesson - Inline PLSQL from SQL
12c Mini Lesson - Inline PLSQL from SQL
Sql notes
Sql notes
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
DBMS LAB
DBMS LAB
More from pooja kumari
Voice recognition
Voice recognition
pooja kumari
Cyber
Cyber
pooja kumari
Queue
Queue
pooja kumari
Introduction to linked lists
Introduction to linked lists
pooja kumari
Thread.ppt
Thread.ppt
pooja kumari
Thread.ppt
Thread.ppt
pooja kumari
Exception handling in java
Exception handling in java
pooja kumari
Exception handling in java
Exception handling in java
pooja kumari
Applet
Applet
pooja kumari
Exception handling
Exception handling
pooja kumari
More from pooja kumari
(10)
Voice recognition
Voice recognition
Cyber
Cyber
Queue
Queue
Introduction to linked lists
Introduction to linked lists
Thread.ppt
Thread.ppt
Thread.ppt
Thread.ppt
Exception handling in java
Exception handling in java
Exception handling in java
Exception handling in java
Applet
Applet
Exception handling
Exception handling
Recently uploaded
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
Recently uploaded
(20)
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Sql seuence and sub queries
1.
SQL> create sequence
pooja; Sequence created. SQL> minvalue with1 SP2-0734: unknowncommandbeginning"minvaluew..." - restof line ignored. SQL> minvalue 1 SP2-0042: unknowncommand"minvalue1" - restof line ignored. SQL> create sequence sqnamestartwith1 2 incrementby1; Sequence created. SQL> create table stud(s_idnumber(2),s_name varchar2(21)); create table stud(s_idnumber(2),s_name varchar2(21)) * ERROR at line 1: ORA-00955: name is alreadyusedbyan existingobject SQL> create table stud1(s_idnumber(2),s_name varchar2(21)); Table created. SQL> insertintostud1("1","pooja"); insertintostud1("1","pooja") *
2.
ERROR at line
1: ORA-00926: missingVALUESkeyword SQL> insertintostud1 values("1","pooja"); insertintostud1values("1","pooja") * ERROR at line 1: ORA-00984: columnnot allowedhere SQL> insertintostud1 values('1'.'pooja'); insertintostud1values('1'.'pooja') * ERROR at line 1: ORA-00917: missingcomma SQL> insertintostud1 values('1','pooja'); 1 rowcreated. SQL> insertintostud1 values('2','riya'); 1 rowcreated. SQL> insertintostud1 values('2','riya'); 1 rowcreated.
3.
SQL> insertintostud1 values(sqname.nextval,'rekha'); 1
rowcreated. SQL> selectc*formstud1; SP2-0734: unknowncommandbeginning"selectc*f..." - restof line ignored. SQL> select*formstud1; select*formstud1 * ERROR at line 1: ORA-00923: FROM keywordnotfoundwhere expected SQL> select*fromstud1; S_ID S_NAME ---------- --------------------- 1 pooja 2 riya 2 riya 1 rekha SQL> insertintostud1 values(sqname.nextval,'radhika'); 1 rowcreated. SQL> select*fromstud1;
4.
S_ID S_NAME ---------- --------------------- 1
pooja 2 riya 2 riya 1 rekha 2 radhika SQL> create table student1(s_idnumber(4),s_name varchar2(21),addressvarchar2( 21),s_contactN number(7)); create table student1(s_idnumber(4),s_name varchar2(21),addressvarchar2(21),s _contactN number(7)) * ERROR at line 1: ORA-00955: name is alreadyusedbyan existingobject SQL> create table studentmca(s_idnumber(4),s_name varchar2(21),addressvarchar 2(21),s_contactN number(7)); Table created. SQL> desc studentmca; Name Null? Type ----------------------------------------- -------- ---------------------------- S_ID NUMBER(4) S_NAME VARCHAR2(21) ADDRESS VARCHAR2(21)
5.
S_CONTACTN NUMBER(7) SQL> create
table studentmca(s_idnumber(4),p1number(4),p2number(4),p3number (4)); create table studentmca(s_idnumber(4),p1number(4),p2number(4),p3number(4)) * ERROR at line 1: ORA-00955: name is alreadyusedbyan existingobject SQL> create table resultmca(s_idnumber(4),p1number(4),p2number(4),p3number( 4)); Table created. SQL> desc resultmca; Name Null? Type ----------------------------------------- -------- ---------------------------- S_ID NUMBER(4) P1 NUMBER(4) P2 NUMBER(4) P3 NUMBER(4) SQL> desc studentmca; Name Null? Type ----------------------------------------- -------- ---------------------------- S_ID NUMBER(4)
6.
S_NAME VARCHAR2(21) ADDRESS VARCHAR2(21) S_CONTACTN
NUMBER(7) SQL> inserttable studentmcavalues('1','pooja','kurji','7654303'); inserttable studentmcavalues('1','pooja','kurji','7654303') * ERROR at line 1: ORA-00925: missingINTOkeyword SQL> insertintostudentmcavalues('1','pooja','kurji','7654303'); 1 rowcreated. SQL> insertintostudentmcavalues('2','pushpaq','patna','7624303'); 1 rowcreated. SQL> insertintostudentmcavalues('3','ravi','patna','6624303'); 1 rowcreated. SQL> insertintostudentmcavalues('4','raja','patna','6634303'); 1 rowcreated. SQL> insertintostudentmcavalues('5','raj','delhi','6637303');
7.
1 rowcreated. SQL> desc
resultmca; Name Null? Type ----------------------------------------- -------- ---------------------------- S_ID NUMBER(4) P1 NUMBER(4) P2 NUMBER(4) P3 NUMBER(4) SQL> insertintoresultmcavalues('1','45','65','76'); 1 rowcreated. SQL> insertintoresultmcavalues('2','47','64','76'); 1 rowcreated. SQL> insertintoresultmcavalues('3','47','65','78'); 1 rowcreated. SQL> insertintoresultmcavalues('4','46','68','78'); 1 rowcreated. SQL> insertintoresultmcavalues('5','46','69','78');
8.
1 rowcreated. SQL> select*from
resultmca; S_ID P1 P2 P3 ---------- -------------------- ---------- 1 45 65 76 2 47 64 76 3 47 65 78 4 46 68 78 5 46 69 78 SQL> select* from'p1' where s_idinwhere p1>60; select* from'p1' where s_idinwhere p1>60 * ERROR at line 1: ORA-00903: invalidtable name SQL> select* from studentmcawhere s_idin(selectidfromresultmcawhere p1>=6 0); select* fromstudentmcawhere s_idin(selectidfromresultmcawhere p1>=60) * ERROR at line 1: ORA-00904: "ID": invalididentifier SQL> select* from studentmcawhere s_idin(selects_idfromresultmcawhere p1> =60);
9.
no rowsselected SQL> select*
from studentmcawhere s_idin(selects_idfromresultmcawhere p3> =60); S_ID S_NAME ADDRESS S_CONTACTN ---------- --------------------- --------------------- ---------- 1 pooja kurji 7654303 2 pushpaq patna 7624303 3 ravi patna 6624303 4 raja patna 6634303 5 raj delhi 6637303 SQL>
Download now