Friday, April 12, 2019

Natural language processing previous year question paper(2009)

                    CS/B.Tech/(CSE)/SEM-8-April/CS-802B/2009
                                              2009
                    NATURAL LANGUAGE PROCESSING


Time Allotted : 3 Hours                                                                    Full Marks : 70 


                              The figures in the margin indicate full marks.

               Candidates are required to give their answers in their own words 

                                               as far as practicable.


                                   GROUP – A
                ( Multiple Choice Type Questions )


1.  Choose the correct alternatives for the following.  10*1 = 10

i) / [ 0 1 2 3 4 5 6 7 8 9 ] / specifiees
a) single digit
b) multiple digit
c) any digit
d) none of these

ii) colou?r mztches
a) color
b) color or colour
c) colour
d) none of these

iii) Minimum edit distance is computed by
a) Phonology
b) Dynamic programming
c) Tautology
d) Hidden Markov Model ( HMM ).

iv) Word probability is calculated by
a) Likelihood probability
b) Prior probability
c) Baye's rule
d) none of these.

v) Viterbi algorithm is used in
a) speech processing
b) Language processing
c) Speech & Language processing
d) none of these.

vi) In deleted interpolation algorithm, which symbol is used ?
a)  α 
b)  β
c)  γ
d) μ

vii) Entropy is used to
a) measure the information
b)correct the information
c) detect the information
d) handle the noise.

viii) Open class contains
a) nouns
b)verbs
c) both (a) and (b)

d) none of these



ix) Phrase Structure Grammar is used in

a) a) Regular Grammar
b) Context–Free Grammar ( CFG )
c) Context–Sensitive Grammar ( CSG )
d) None of these.

x) Subcategorize of verbs is classified into
a) Transitive
c) both (a) & (b)
b) Intransitive
d) none of these.

                                                            GROUP -B

                                         ( Short Answer Type Questions )
                                      Answer any three of the following.   3*5=15



2) What is Regular Expression ? Write down the Regular
Expression for the following languages :
a) The set of all alphabetic strings
b) $ 199.99
c) 4.3 MHz. 

3 )Write down the differences between Inflectional Morphology
and Derivational Morphology with suitable example. What is
stem ? What is morpheme ?  
                  
4) Define two level Morphology with suitable example. Briefly
describe the different types of Error Handling mechanism.
   
5) Why POS ( Part – of – Speech ) Tagging is required in NLP
( Natural Language Processing ) ? Briefly compare the Top – Down & Bottom – Up Parsing techniques.  
                                                                                 
6) Write down the concept of feature structure. What is
unification ? What is Word Sense Disambiguation ( WSD ) ?
                                                                                                              

                                                GROUP – C
                                 ( Long Answer Type Questions )
                          Answer any three of the followin  : 3*15 =45


7) a) What is Smoothing ? Why is it required ?
b) Write down the equation for trigram probability estimation.
c) Write down the equation for the discount d = c /c for add-one smoothing. Do the same thing used for Written Bell smoothing. How do they differ?                                                          
8) Find one tagging error in each of the following sentence that are tagged with the
Penn Treebank tagset :

i) I/PRP need/VBP a/DT flight/NN from/IN Atlana/NN
ii) Does/VBZ this/DT flight/NN serve/VB dinner/NNS
iii) I/PRP have/VB a/DT friend/NN living/VBG in/IN Denver/NNP.

b) Briefly describe the roles of Finite State Transducer ( F S T ) with suitable
example.

c) Define Prior probability and likelihood probability using Bayesian Method.

d) What is Confusion Matrix ? Why is it required in NLP ( Natural Language
Processing ) ?                                                                                                                           
9. a) Compute Minimum edit by hand. Figure out whether the word intention is closer to the word execution and calculate a minimum edit distance.
b) Estimate p ( t / c ) as follows (where c p is the pth character of the word c ) using Kernigham et al. four confusion matrices, one for each type of single error.
c) Briefly describe Hidden Markov Model ( HMM ).
d) Compare open class & closed class word groups with suitable examples.                 

10. a)Draw tree structure for the following ATIS sentences :
I perfer a morning flight
i want a morning flight
Using S-->NP VP
NP-->Pronoun|
Pronoun-Noun
|Det Nominal
Nominal-->|Noun Nominal
|Noun
VP-->verb
|Verb NP
|Verb NP PP
| Verb PP


b) Write rules expressing the verbal subcategory of English auxiliaries with example.
d) How are Transformation Based Learning ( TBL ) Rules applied in NLP ( Natural Language Processing ) ?                                                                                                          

11. Write short notes on any three of the following :         
a) Two level morphology
b) Stochastic Part-of-Speech Tagging
c) HMM Tagging
d) Constituency & Agreement.     
e) Problems with the basic top down parser
f) orthographic rules

                                             -----------------------x-------------------

Natural language processing previous year question paper(2011)

                    CS/B.Tech/(CSE)/SEM-8/CS-802B/2011
                                              2011
                    NATURAL LANGUAGE PROCESSING


Time Allotted : 3 Hours                                                                    Full Marks : 70 


                              The figures in the margin indicate full marks.

               Candidates are required to give their answers in their own words 

                                               as far as practicable.


                                   GROUP – A
                ( Multiple Choice Type Questions )


1.  Choose the correct alternatives for the following.  10*1 = 10

i) Word probability is calculated by
a) Likelihood probability
b) Prior probability
c) Baye's rule

d) none of these.

ii) The use of the period (.) is to specify
a) any context
b) any number
c) any character

d) none of these.

iii) Minimum edit distance is computed by
a) Phonology
b) Dynamic programming
c) Tautology
d) Hidden Markov Model ( HMM ).

iv) The use of brackets [ ] is to specify
a) disjunction of characters
b) disjunction of numbers
c) words sequence
d) none of these.

v) Viterbi algorithm is used in
a) speech processing
b) Language processing
c) Speech & Language processing

d) none of these.

vi) In deleted interpolation algorithm, which symbol is used ?
a)  α 
b)  β
c)  γ
d) μ

vii) Entropy is used to
a) measure the information
b)correct the information
c) detect the information
d) handle the noise.



viii) Phrase Structure Grammar is used in
a) a) Regular Grammar
b) Context–Free Grammar ( CFG )
c) Context–Sensitive Grammar ( CSG )
d) None of these.

ix) Open class contains
a) nouns
b)verbs
c) both (a) and (b)
d) none of these

x) Subcategorize of verbs is classified into
a) Transitive
c) both (a) & (b)
b) Intransitive
d) none of these.

                                                            GROUP -B

                                         ( Short Answer Type Questions )
                                      Answer any three of the following.   3*5=15



2) What is Regular Expression ? Write down the Regular
Expression for the following languages :
a) The set of all alphabetic strings
b) Column 1 Column 2 Column 3
c) 4.3 Gb. 

3 )Write down the differences between Inflectional Morphology

and Derivational Morphology with suitable example. What is
stem ? What is morpheme ?  
                  
4) Define two level Morphology with suitable example. Briefly
describe the different types of Error Handling mechanism.
   
5) Why POS ( Part – of – Speech ) Tagging is required in NLP
( Natural Language Processing ) ? Briefly compare the Top – Down & Bottom – Up Parsing techniques.  
                                                                                 
6) Write down the concept of feature structure. What is
unification ? What is Word Sense Disambiguation ( WSD ) ?
                                                                                                              

                                                GROUP – C
                                 ( Long Answer Type Questions )
                          Answer any three of the followin  : 3*15 =45


8) a) What is Smoothing ? Why is it required ?
b) Write down the equation for trigram probability estimation.
c) Write down the equation for the discount d = c /c for add-one smoothing. Do the same thing used for Written Bell smoothing. How do they differ?                                                          

7) a) Define wordform, lemma, type, token.
    b) Briefly describe the role of Finite State Tranducer
        ( FST ) with suitable example.
    c) Define prior probability and likelihood probability using Bayesian Method.
    d) What is Confusion Matrix ? Why is it required in NLP( Natural Language Processing )?                                                                                                                                                     9. a) Compute Minimum edit by hand. Figure out whether the word intention is closer to the word execution and calculate a minimum edit distance.
b) Estimate p ( t / c ) as follows (where c p is the pth character of the word c ) using Kernigham et al. four confusion matrices, one for each type of single error.
c) Briefly describe Hidden Markov Model ( HMM ).
d) Compare open class & closed class word groups with suitable examples.                 

10. a)Draw tree structure for the following ATIS sentences :
I perfer a morning flight
i want a morning flight
Using S-->NP VP
NP-->Pronoun|
Pronoun-Noun
|Det Nominal
Nominal-->|Noun Nominal
|Noun
VP-->verb
|Verb NP
|Verb NP PP
| Verb PP


b) Write rules expressing the verbal subcategory of English auxiliaries with example.
c)Define predeterminers, cardinal numbers, ordinal numbers and quantifiers with suitable examples.
d) How are Transformation Based Learning ( TBL ) Rules applied in NLP ( Natural Language Processing ) ?                                                                                                          

11. Write short notes on any three of the following :         
a) Weighted Automata
b) Baye's rule in noisy channel
c) Stochastic Part-of-Speech Tagging
d) HMM Tagging
e) Constituency & Agreement.     
f) Problems with the basic top down parser
g) Regular expression (R>E) patterns
h) orthographic rules

                                             -----------------------x-------------------

Natural language processing previous year question paper (2012)

                    CS/B.Tech/(CSE)/SEM-8/CS-802B/2012
                                              2012
                    NATURAL LANGUAGE PROCESSING


Time Allotted : 3 Hours                                                                    Full Marks : 70 


                              The figures in the margin indicate full marks.

               Candidates are required to give their answers in their own words 

                                               as far as practicable.


                                   GROUP – A
                ( Multiple Choice Type Questions )


1.  Choose the correct alternatives for the following.  10*1 = 10

i) The use of the period (.) is to specify
a) any context
b) any number
c) any character

d) none of these.

ii) Word probability is calculated by
a) Likelihood probability
b) Prior probability
c) Baye's rule
d) none of these.


iii) Minimum edit distance is computed by
a) Phonology
b) Dynamic programming
c) Tautology
d) Hidden Markov Model ( HMM ).

iv) The use of brackets [ ] is to specify
a) disjunction of characters
b) disjunction of numbers
c) words sequence
d) none of these.

v) Viterbi algorithm is used in
a) speech processing
b) Language processing
c) Speech & Language processing

d) none of these.

vi) In deleted interpolation algorithm, which symbol is used ?
a)  α 
b)  β
c)  γ
d) μ

vii) Entropy is used to
a) measure the information
b)correct the information
c) detect the information
d) handle the noise.



viii) Phrase Structure Grammar is used in
a) a) Regular Grammar
b) Context–Free Grammar ( CFG )
c) Context–Sensitive Grammar ( CSG )
d) None of these.

ix) Open class contains
a) nouns
b)verbs
c) both (a) and (b)
d) none of these

x) Subcategorize of verbs is classified into
a) Transitive
c) both (a) & (b)
b) Intransitive
d) none of these.

                                                            GROUP -B

                                         ( Short Answer Type Questions )
                                      Answer any three of the following.   3*5=15



2) What is Regular Expression ? Write down the Regular
Expression for the following languages :
a) The set of all alphabetic strings
b) Column 1 Column 2 Column 3
c) 5.7 Gb. 

3) Define two level Morphology with suitable example. Briefly
describe the different types of Error Handling mechanism.
   
4 )Write down the differences between Inflectional Morphology

and Derivational Morphology with suitable example. What is
stem ? What is morpheme ?                    

5) Why POS ( Part – of – Speech ) Tagging is required in NLP
( Natural Language Processing ) ? Briefly compare the Top – Down & Bottom – Up Parsing techniques.  
                                                                                 
6) Write down the concept of feature structure. What is
unification ? What is Word Sense Disambiguation ( WSD ) ?
                                                                                                              

                                                GROUP – C
                                 ( Long Answer Type Questions )
                          Answer any three of the followin  : 3*15 =45


8) a) What is Smoothing ? Why is it required ?
b) Write down the equation for trigram probability estimation.
c) Write down the equation for the discount d = c /c for add-one smoothing. Do the same thing used for Written Bell smoothing. How do they differ?                                                          

7) a) Define wordform, lemma, type, token.
    b) Briefly describe the role of Finite State Tranducer
        ( FST ) with suitable example.
    c) Define prior probability and likelihood probability using Bayesian Method.
    d) What is Confusion Matrix ? Why is it required in NLP( Natural Language Processing )?                                                                                                                                                     9. a) Compute Minimum edit by hand. Figure out whether the word intention is closer to the word execution and calculate a minimum edit distance.
b) Estimate p ( t / c ) as follows (where c p is the pth character of the word c ) using Kernigham et al. four confusion matrices, one for each type of single error.
c) Briefly describe Hidden Markov Model ( HMM ).
d) Compare open class & closed class word groups with suitable examples.                 

10. a)Draw tree structure for the following ATIS sentences :
I perfer a morning flight
i want a morning flight
Using S-->NP VP
NP-->Pronoun|
Pronoun-Noun
|Det Nominal
Nominal-->|Noun Nominal
|Noun
VP-->verb
|Verb NP
|Verb NP PP
| Verb PP


b) Write rules expressing the verbal subcategory of English auxiliaries with example.
c)Define predeterminers, cardinal numbers, ordinal numbers and quantifiers with suitable examples.
d) How are Transformation Based Learning ( TBL ) Rules applied in NLP ( Natural Language Processing ) ?                                                                                                          

11. Write short notes on any three of the following :         
a) Weighted Automata
b) Baye's rule in noisy channel
c) Stochastic Part-of-Speech Tagging
d) HMM Tagging
e) Constituency & Agreement.     
f) Problems with the basic top down parser

                                             -----------------------x-------------------

Natural language processing Previous Year Question paper(2010)

                    CS/B.Tech/CSE/SEM-8/CS-802B/2010
                                              2010
                    NATURAL LANGUAGE PROCESSING


Time Allotted : 3 Hours                                                                        Full Marks : 70 


                                       The figures in the margin indicate full marks.

                      Candidates are required to give their answers in their own words 

                                                      as far as practicable.


                                   GROUP – A
                ( Multiple Choice Type Questions )


1.  Choose the correct alternatives for the following.  10*1 = 10
i) Word probability is calculated by
a) Likelihood probability
b) Prior probability
c) Baye's rule
d) none of these.

ii) Viterbi algorithm is used in
a) speech processing
b) Language processing
c) Speech & Language processing
d) none of these.

iii) Minimum edit distance is computed by
a) Phonology
b) Dynamic programming
c) Tautology
d) Hidden Markov Model ( HMM ).

iv) The use of the period (.) is to specify
a) any context
b) any number
c) any character
d) none of these.

v) Entropy is used to
a) measure the information
b)correct the information
c) detect the information
d) handle the noise.


vi) Open class contains
a) nouns
b)verbs
c) both (a) and (b)
d) none of these

vii) In deleted interpolation algorithm, which symbol is used ?
a)  α 
b)  β
c)  γ
d) μ


viii) Subcategorize of verbs is classified into
a) Transitive
c) both (a) & (b)
b) Intransitive
d) none of these.

ix) The use of | is to specify
a) disjunction of characters
b) disjunction of numbers
c) words sequence
d) none of these.

x) Phrase Structure Grammar is used in
a) a) Regular Grammar
b) Context–Free Grammar ( CFG )
c) Context–Sensitive Grammar ( CSG )
d) None of these.

                                                            GROUP -B

                                         ( Short Answer Type Questions )
                                      Answer any three of the following.   3*5=15


2) What is Regular Expression ? Write down the Regular
Expression for the following languages :
a) The set of all alphabetic strings
b) Column 1 Column 2 Column 3
c) 4.3 Gb. 

3 )Write down the differences between Inflectional Morphology
and Derivational Morphology with suitable example. What is
stem ? What is morpheme ?


4) Define two level Morphology with suitable example. Briefly
describe the different types of Error Handling mechanism.                       

5) Why POS ( Part – of – Speech ) Tagging is required in NLP
( Natural Language Processing ) ? Briefly compare the Top – Down & Bottom – Up Parsing techniques.  
                                                                                 

6) Write down the concept of feature structure. What is
unification ? What is Word Sense Disambiguation ( WSD ) ?
                                                                                                              

                                                GROUP – C
                                 ( Long Answer Type Questions )
                          Answer any three of the followin  : 3*15 =45


7. a) What is Smoothing ? Why is it required ?
b) Write down the equation for trigram probability estimation.
c) Write down the equation for the discount d = c /c for add-one smoothing. Do the same thing used for Written Bell smoothing. How do they differ?                                                          

8) a) Define wordform, lemma, type, token.
    b) Briefly describe the role of Finite State Tranducer
        ( FST ) with suitable example.
    c) Define prior probability and likelihood probability using Bayesian Method.
    d) What is Confusion Matrix ? Why is it required in NLP( Natural Language Processing )?                                                                                                                                                     9. a) Compute Minimum edit by hand. Figure out whether the word intention is closer to the word execution and calculate a minimum edit distance.
b) Estimate p ( t / c ) as follows (where c p is the pth character of the word c ) using Kernigham et al. four confusion matrices, one for each type of single error.
c) Briefly describe Hidden Markov Model ( HMM ).
d) Compare open class & closed class word groups with suitable examples.                 

10. a)Draw tree structure for the following ATIS sentences :
I perfer a morning flight
i want a morning flight
Using S-->NP VP
NP-->Pronoun|
Pronoun-Noun
|Det Nominal
Nominal-->|Noun Nominal
|Noun
VP-->verb
|Verb NP
|Verb NP PP
| Verb PP


b) Write rules expressing the verbal subcategory of English auxiliaries with example.
c)Define predeterminers, cardinal numbers, ordinal numbers and quantifiers with suitable examples.
d) How are Transformation Based Learning ( TBL ) Rules applied in NLP ( Natural Language Processing ) ?                                                                                                          

11. Write short notes on any three of the following :         
a) Regular Expression Patterns
b) Orthographic Rules
c) Stochastic Part-of-Speech Tagging
d) HMM Tagging
e) Constituency & Agreement.     
f) Problems with the basic top down parser

Natural language processing Previous year question paper(2013)

                    CS/B.Tech/CSE/SEM-8/CS-802F/2013
                                              2013
                    NATURAL LANGUAGE PROCESSING

Time Allotted : 3 Hours                                                                                   Full Marks : 70


                                         The figures in the margin indicate full marks.
                           Candidates are required to give their answers in their own words
                                                     as far as practicable.

                                                     GROUP – A
                                  ( Multiple Choice Type Questions )

1.  Choose the correct alternatives for the following.  10*1 = 10
i) Minimum edit distance is computed by
a) Phonology
b) Dynamic programming
c) Tautology
d) Hidden Markov Model ( HMM ).

ii) Word probability is calculated by
a) Likelihood probability
b) Prior probability
c) Baye's rule
d) none of these.

iii) Viterbi algorithm is used in
a) speech processing
b) Language processing
c) Speech & Language processing
d) none of these.

iv) The use of the period (.) is to specify
a) any context
b) any number
c) any character
d) none of these.

v) The use of | is to specify
a) disjunction of characters
b) disjunction of numbers
c) words sequence
d) none of these.

vi) Open class contains
a) nouns
b)verbs
c) both (a) and (b)
d) none of these

vii) In deleted interpolation algorithm, which symbol is used ?
a)  α 
b)  β
c)  γ
d) μ

viii) Entropy is used to
a) measure the information
b)correct the information
c) detect the information
d) handle the noise.

ix) Subcategorize of verbs is classified into
a) Transitive
c) both (a) & (b)
b) Intransitive
d) none of these.

x) Phrase Structure Grammar is used in
a) a) Regular Grammar
b) Context–Free Grammar ( CFG )
c) Context–Sensitive Grammar ( CSG )
d) None of these.

                                                  GROUP -B
                                         ( Short Answer Type Questions )
                                      Answer any three of the following.   3*5=15

2 ) Define two level Morphology with suitable example. Briefly
describe the different types of Error Handling mechanism.                         3 + 2

3) Why POS ( Part – of – Speech ) Tagging is required in NLP
( Natural Language Processing ) ? Briefly compare the Top – Down & Bottom – Up Parsing techniques. 
                                                                                                   3+2
4) What is Regular Expression ? Write down the Regular
Expression for the following languages :
a) The set of all alphabetic strings
b) Column 1 Column 2 Column 3
c) 5.7 Gb.                                                                                       2+3

5) Write down the concept of feature structure. What is
unification ? What is Word Sense Disambiguation ( WSD ) ?
                                                                                                                2 + 1 + 2
6.Write down the differences between Inflectional Morphology
and Derivational Morphology with suitable example. What is
stem ? What is morpheme ?                                                                       3+1+1

                                                GROUP – C
                                 ( Long Answer Type Questions )
                          Answer any three of the followin  : 3*15 =45

7) a) Define wordform, lemma, type, token.
    b) Briefly describe the role of Finite State Tranducer
         ( FST ) with suitable example.
    c) Define prior probability and likelihood probability using Bayesian Method.
    d) What is Confusion Matrix ? Why is it required in NLP( Natural Language Processing ) ?                                                                                                                                                          4 + 5 + 4 + 2

8. a)Draw tree structure for the following ATIS sentences :
I perfer a morning flight
i want a morning flight
Using S-->NP VP
NP-->Pronoun|
Pronoun-Noun
|Det Nominal
Nominal-->|Noun Nominal
|Noun
VP-->verb
|Verb NP
|Verb NP PP
| Verb PP


b) Write rules expressing the verbal subcategory of English auxiliaries with example.
c)Define predeterminers, cardinal numbers, ordinal numbers and quantifiers with suitable examples.
d) How are Transformation Based Learning ( TBL ) Rules applied in NLP ( Natural Language Processing ) ?                                                                                                                  5 + 3 + 4 + 3

9. a) Compute Minimum edit by hand. Figure out whether the word intention is closer to the word execution and calculate a minimum edit distance.
b) Estimate p ( t / c ) as follows (where c p is the pth character of the word c ) using Kernigham et al. four confusion matrices, one for each type of single error.
c) Briefly describe Hidden Markov Model ( HMM ).
d) Compare open class & closed class word groups with suitable examples.                  6 + 3 + 4 + 2

10. a) What is Smoothing ? Why is it required ?
b) Write down the equation for trigram probability estimation.
c) Write down the equation for the discount d = c /c for add-one smoothing. Do the same thing used for Written Bell smoothing. How do they differ?                                                           2+1+3+5+4

11. Write short notes on any three of the following :         
a) Regular Expression Patterns
b) Orthographic Rules
c) Stochastic Part-of-Speech Tagging
d) HMM Tagging
e) Constituency & Agreement.                                      3*5=15
                                            
                                        --------------------------------------------------------
                                        -------------------------------------------------------

Monday, March 25, 2019

How to insert multiple entry or row in SQL

insert multiple row in SQL is very easy. don't worry about it.

mysql> create table orders(orderid varchar(10), customerid varchar(10), orderdate varchar(10));
Query OK, 0 rows affected (0.02 sec)

mysql> desc orders;
+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| orderid    | varchar(10) | YES  |     | NULL    |       |
| customerid | varchar(10) | YES  |     | NULL    |       |
| orderdate  | varchar(10) | YES  |     | NULL    |       |
+------------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)

mysql> insert into orders(orderid,customerid,orderdate) values ('10308', '2', '1996-09-18'), ('10309', '37', '1996-09-19'), ('10310', '77', '1996-09-20');
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from orders;
+---------+------------+------------+
| orderid | customerid | orderdate  |
+---------+------------+------------+
| 10308   | 2          | 1996-09-18 |
| 10309   | 37         | 1996-09-19 |
| 10310   | 77         | 1996-09-20 |
+---------+------------+------------+
3 rows in set (0.00 sec)

SQL INSERT INTO SELECT Statement with Example

SQL INSERT INTO SELECT Statement

  • INSERT INTO SELECT copies data from one table to another table.
  • INSERT INTO SELECT requires that data types in source and target tables match

The SQL INSERT INTO SELECT syntax

The general syntax is:
  1. INSERT INTO table-name (column-names) SELECT column-names FROM table-name WHERE condition

SQL INSERT SELECT INTO Example

SQL SELECT INTO Statement With Exxample

SQL SELECT INTO Statement

  • SELECT INTO copies data from one table into a new table.
  • SELECT INTO creates a new table located in the default filegroup.

The SQL SELECT INTO syntax

The general syntax is:
  1. SELECT column-names INTO new-table-name FROM table-name WHERE EXISTS (SELECT column-name FROM table-name WHERE condition)


The new table will have column names as specified in the query.

SQL SELECT INTO Example

SQL WHERE EXISTS Statement with Example

SQL WHERE EXISTS Statement

  • WHERE EXISTS tests for the existence of any records in a subquery.
  • EXISTS returns true if the subquery returns one or more records.
  • EXISTS is commonly used with correlated subqueries.

The SQL EXISTS syntax

The general syntax is:
  1. SELECT column-names FROM table-name WHERE EXISTS (SELECT column-name FROM table-name WHERE condition)

SQL EXISTS Example