SlideShare a Scribd company logo
1 of 9
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")
*
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.
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;
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)
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)
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');
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');
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);
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>

More Related Content

What's hot

Database Management System
Database Management SystemDatabase Management System
Database Management SystemHitesh Mohapatra
 
UKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresUKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresConnor McDonald
 
PHP Static Code Review
PHP Static Code ReviewPHP Static Code Review
PHP Static Code ReviewDamien Seguy
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 UsageWilliam Lee
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNRonald Bradford
 
Connor McDonald 11g for developers
Connor McDonald 11g for developersConnor McDonald 11g for developers
Connor McDonald 11g for developersInSync Conference
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestConnor McDonald
 
Ruby closures, how are they possible?
Ruby closures, how are they possible?Ruby closures, how are they possible?
Ruby closures, how are they possible?Carlos Alonso Pérez
 
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019  - 10 great sql featuresLatin America Tour 2019  - 10 great sql features
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
 
Slaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in RubySlaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in RubyJason Yeo Jie Shun
 

What's hot (20)

Database Management System
Database Management SystemDatabase Management System
Database Management System
 
UKOUG 2019 - SQL features
UKOUG 2019 - SQL featuresUKOUG 2019 - SQL features
UKOUG 2019 - SQL features
 
Quick reference for cql
Quick reference for cqlQuick reference for cql
Quick reference for cql
 
Sql ejercicio 1
Sql ejercicio 1Sql ejercicio 1
Sql ejercicio 1
 
PHP Static Code Review
PHP Static Code ReviewPHP Static Code Review
PHP Static Code Review
 
Explain
ExplainExplain
Explain
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
4sem dbms(1)
4sem dbms(1)4sem dbms(1)
4sem dbms(1)
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
 
Connor McDonald 11g for developers
Connor McDonald 11g for developersConnor McDonald 11g for developers
Connor McDonald 11g for developers
 
Sql
SqlSql
Sql
 
ZFINDALLZPROGAM
ZFINDALLZPROGAMZFINDALLZPROGAM
ZFINDALLZPROGAM
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
 
Pdxpugday2010 pg90
Pdxpugday2010 pg90Pdxpugday2010 pg90
Pdxpugday2010 pg90
 
Ruby closures, how are they possible?
Ruby closures, how are they possible?Ruby closures, how are they possible?
Ruby closures, how are they possible?
 
ANSI vs Oracle language
ANSI vs Oracle languageANSI vs Oracle language
ANSI vs Oracle language
 
Les09
Les09Les09
Les09
 
Les11
Les11Les11
Les11
 
Latin America Tour 2019 - 10 great sql features
Latin America Tour 2019  - 10 great sql featuresLatin 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 RubySlaying the Dragon: Implementing a Programming Language in Ruby
Slaying the Dragon: Implementing a Programming Language in Ruby
 

Similar to Sql seuence and sub queries

DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manualmaha tce
 
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersOpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersConnor McDonald
 
Finding SQL execution outliers
Finding SQL execution outliersFinding SQL execution outliers
Finding SQL execution outliersMaxym Kharchenko
 
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docxCreating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docxwillcoxjanay
 
MySQL Database System Hiep Dinh
MySQL Database System Hiep DinhMySQL Database System Hiep Dinh
MySQL Database System Hiep Dinhwebhostingguy
 
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docxAdvanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docxcoubroughcosta
 
Relational DB Course
Relational DB  Course Relational DB  Course
Relational DB Course Sunny U Okoro
 
12c Mini Lesson - Better Defaults
12c Mini Lesson - Better Defaults12c Mini Lesson - Better Defaults
12c Mini Lesson - Better DefaultsConnor McDonald
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleFarhan Aslam
 
Best sql plsql_material for B.TECH
Best sql plsql_material for B.TECH 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 SQL12c Mini Lesson - Inline PLSQL from SQL
12c Mini Lesson - Inline PLSQL from SQLConnor McDonald
 
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?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 MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBAntony T Curtis
 
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdfඅරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdfAnilManage
 

Similar to Sql seuence and sub queries (20)

Plsql lab mannual
Plsql lab mannualPlsql lab mannual
Plsql lab mannual
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
 
OpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer DisastersOpenWorld 2018 - Common Application Developer Disasters
OpenWorld 2018 - Common Application Developer Disasters
 
Finding SQL execution outliers
Finding SQL execution outliersFinding SQL execution outliers
Finding SQL execution outliers
 
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docxCreating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
Creating Tablespaces and Tables in DB2BCIS 4620zArchit.docx
 
MySQL Database System Hiep Dinh
MySQL Database System Hiep DinhMySQL Database System Hiep Dinh
MySQL Database System Hiep Dinh
 
mysqlHiep.ppt
mysqlHiep.pptmysqlHiep.ppt
mysqlHiep.ppt
 
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docxAdvanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
Advanced SQLCharles WilliamsCS352 Unit 4 IPProfessor Jeffe.docx
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Relational DB Course
Relational DB  Course Relational DB  Course
Relational DB Course
 
12c Mini Lesson - Better Defaults
12c Mini Lesson - Better Defaults12c Mini Lesson - Better Defaults
12c Mini Lesson - Better Defaults
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
 
Dbms lab Manual
Dbms lab ManualDbms lab Manual
Dbms lab Manual
 
Best sql plsql_material for B.TECH
Best sql plsql_material for B.TECH 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 SQL12c Mini Lesson - Inline PLSQL from SQL
12c Mini Lesson - Inline PLSQL from SQL
 
Sql notes
Sql notesSql notes
Sql notes
 
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?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 MariaDBUsing 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අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
අරුණ හේරත්_MYSQL සිංහල_TL_I_033__techlogiclk.com.pdf
 
DBMS LAB
DBMS LABDBMS LAB
DBMS LAB
 

More from pooja kumari

More from pooja kumari (10)

Voice recognition
Voice recognitionVoice recognition
Voice recognition
 
Cyber
CyberCyber
Cyber
 
Queue
QueueQueue
Queue
 
Introduction to linked lists
Introduction to linked listsIntroduction to linked lists
Introduction to linked lists
 
Thread.ppt
Thread.pptThread.ppt
Thread.ppt
 
Thread.ppt
Thread.pptThread.ppt
Thread.ppt
 
Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
 
Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
 
Applet
AppletApplet
Applet
 
Exception handling
Exception handlingException handling
Exception handling
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola 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 AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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 - 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 Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...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 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 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 MountBreaking 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 101Salesforce 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 AutomationFrom 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 PresentationMy 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[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 pragmaticsKotlin 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 organizationScaling 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 interpreterPresentation 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 ...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 Men08448380779 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 PresentationGenCyber 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...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 365Tech-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 InnovationBeyond 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 machineInstall 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 | DelhiFULL 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.pptxMaximizing 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] 2024SQL 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 GraphSIEMENS: 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>