Greater than two values in subquery : Sub query « Select Clause « SQL / MySQL

Greater than two values in subquery

    ->         (MATCHNO         INTEGER NOT NULL,
    ->          TEAMNO          INTEGER NOT NULL,
    ->          EmployeeNO        INTEGER NOT NULL,
    ->          WON             SMALLINT NOT NULL,
    ->          LOST            SMALLINT NOT NULL,
    ->          START_DATE      DATE NOT NULL,
    ->          START_TIME      TIME NOT NULL,
    ->          END_TIME        TIME NOT NULL,
    ->          PRIMARY KEY     (MATCHNO));
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO MATCHES_SPECIAL VALUES (1, 1, 6, 3, 1, '2004-10-25', '14:10:12', '16:50:09');
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO MATCHES_SPECIAL VALUES (2, 1, 44, 3, 2, '2004-10-25', '17:00:00', '17:55:48');
Query OK, 1 row affected (0.00 sec)

    ->          FROM     MATCHES_SPECIAL
    ->          WHERE    MATCHNO = 1);
|       1 |
|       2 |
2 rows in set (0.00 sec)

mysql> drop table MATCHES_SPECIAL;
Query OK, 0 rows affected (0.00 sec)



Related examples in the same category

1.Subqueries As Calculated Columns: Simple Subqueries
2.Subqueries in the WHERE Clause 2
3.Subqueries That Return Multiple Results
4.Sub queries
5.Sub query with string concatenate
6.Sub query with not equal and order
7.Sub query with calculation
8.Update command with sub query
9.Delete command with sub query
10.SubSELECTs Syntax Variants
11.Uses a subquery to return an AuthID value
12.Use a not equal (<>) comparison operator in the WHERE clause to introduce the subquery
13.Subquery uses an aggregate function to arrive at a value that the outer statement can use
14.Nested subquery
15.Four-level nested subquery with alias
16.Nested subquery and where clause
17.Minus value from subquery
18.Subquery and equals operator(ERROR 1242 (21000): Subquery returns more than 1 row)
19.Row values and subquery
20.Nested three level subquery
21.Greater than the result of subquery
22.Equals to the result of subquery
23.Row values comparison for subquery
24.Select from the result of subquery
25.Value calculation of subquery
26.Subquery as a table
27.Alias subquery
28.Calculation in subquery
29.Using function with result from subquery
30.Create constant value in subquery
31.Calculation in subquery and use the result from outside
32.Equals operator with subquery
33.Less than and subquery(ERROR 1242 (21000): Subquery returns more than 1 row)
34.Less than data type value from subquery
35.<=> and subquery
36.Less than two values in subquery
37.Get substring for a value from subquery
38.Mix constant value and subquery
39.Using the value from subquery with in operator
40.Pair value within in operator and subquery
41.In a list of value from subquery
42.In operator and subquery
43.Nested subquery and in operator
44.Not in and subquery
45.Between...and opertor and subquery
46.Count value in subquery
47.Add up count value from subquery
48.From a subquery
49.Aggregate function in subquery
50.Having clause with subquery
51.Count and subquery in Having clause
52.Subquery with having clause
53.Order by value from subquery
54.Subquery with limit clause
55.Insert statement with subquery
56.Use a derived table.
57.Searching for Titles Without Authors
58.Compare to aggregate function
59.Data calculation inside in operator
61.Select from three subqueries
62.Select from two subqueries
63.Row value comparison with select statement
64.Compare two data type value together
65.Nested subqueries
66.Two USING clauses, rather than ON clauses
67.Finding people who didn't send mail to themselves