ERROR 1064 (42000) : You Have An Error in Your SQL Syntax Check The Manual That
ERROR 1064 (42000) : You Have An Error in Your SQL Syntax Check The Manual That
corresponds to your MySQL server version for the right syntax to use near 'l' at
line 1
mysql> update pets1 set gender='m' where gender='f';
|m
| NULL |
| NULL |
| NULL |
+-------+--------+---------+--------+------+
3 rows in set (0.00 sec)
| Tables_in_univ_db |
+---------------------+
| course_details
| customer
| customer_2
| invoice
| lecturer_attendance |
| lecturer_courses |
| lecturer_profile |
| lecturer_profile1 |
| login_detail
| pets
| pets1
|
|
|
| player2
| std_fees
| std_fees1
| std_fees2
| student_attd
| student_courses
| student_profile
| test_alt
| try
|
|
|
|
+---------------------+
20 rows in set (0.02 sec)
+--------+---------+----------+--------+------------+
| snowy | tintin | pom
|m
| NULL
|m
| NULL
|m
| NULL
| 2009-09-10 |
+--------+---------+----------+--------+------------+
4 rows in set (0.00 sec)
1|
1001 |
1|
3|
1001 |
3|
4|
1001 |
4|
5|
1001 |
6|
6|
1002 |
1|
7|
1002 |
3|
8|
1002 |
4|
10 |
1003 |
1|
11 |
1003 |
3|
12 |
1003 |
4|
13 |
1003 |
6|
+-------------+------------+-----------+
11 rows in set (0.00 sec)
1001 |
1002 |
1003 |
+------------+
3 rows in set (0.00 sec)
1001 |
4|
1002 |
3|
1003 |
4|
+------------+----------+
1|
1001 | 2015-03-12 | y
2|
1001 | 2015-03-13 | y
3|
1001 | 2015-03-14 | n
5|
1003 | 2015-03-14 | y
6|
1004 | 2015-03-14 | y
43 |
1002 | 2015-03-14 | y
+---------+------------+------------+---------+
6 rows in set (0.02 sec)
+------------+----------+
|
1001 |
3|
1002 |
1|
1003 |
1|
1004 |
1|
+------------+----------+
4 rows in set (0.00 sec)
1001 |
4|
1002 |
3|
1003 |
4|
+------------+----------+
3 rows in set (0.00 sec)
1001 | 1,3,4,6
1002 | 1,3,4
1003 | 1,3,4,6
|
|
|
+------------+-------------------------+
3 rows in set (0.00 sec)
1 | 1001,1002,1003
3 | 1001,1002,1003
4 | 1001,1002,1003
6 | 1001,1003
|
|
+-----------+--------------------------+
4 rows in set (0.00 sec)
| 1001,1002,1003
| EAC11
| 1001,1002,1003
| Mat
| SAD
| 1001,1003
| 1001,1002,1003
|
|
+-------------+------------------------------------------+
4 rows in set (0.00 sec)
| Rani,Darshini,Vicky
| EAC11
| Rani,Darshini,Vicky
| Mat
| SAD
| Rani,Darshini
| Vicky,Rani,Darshini
|
|
+-------------+--------------------------------------------+
1 | 1001,1002,1003
3 | 1001,1002,1003
4 | 1001,1002,1003
6 | 1001,1003
+-----------+--------------------------+
4 rows in set (0.00 sec)
+-----------+--------------------------+
|
1 | 1001,1002,1003
+-----------+--------------------------+
1 row in set (0.09 sec)
| customer
| customer_2
| invoice
|
|
| lecturer_attendance |
| lecturer_courses |
| lecturer_profile |
| lecturer_profile1 |
| login_detail
| pets
| pets1
| player2
| std_fees
| std_fees1
| std_fees2
| student_attd
| student_courses
| student_profile
| test_alt
| try
|
|
|
|
+---------------------+
20 rows in set (0.01 sec)
+--------+---------+----------+--------+------------+
|m
| NULL
|m
| NULL
|m
| NULL
| 2009-09-10 |
+--------+---------+----------+--------+------------+
4 rows in set (0.00 sec)
|m
| NULL |
| NULL |
| NULL |
+-------+--------+---------+--------+------+
3 rows in set (0.00 sec)
+--------+---------+----------+--------+------------+
| name | owner | species | gender | DOB
+--------+---------+----------+--------+------------+
| snowy | tintin | pom
|m
| NULL
|m
| NULL
|m
| NULL
| apso
|m
| 2009-09-10 |
| NULL
+--------+---------+----------+--------+------------+
5 rows in set (0.00 sec)
+--------+---------+----------+--------+------------+
| snowy | tintin | pom
|m
| NULL
|m
| NULL
|m
| NULL
|m
| apso
| NULL
|m
|m
| 2009-09-10 |
|
| NULL
| NULL
+--------+---------+----------+--------+------------+
7 rows in set (0.00 sec)
mysql> select * from pets where pets.name in (select name from pets1);
+-------+--------+---------+--------+------+
| name | owner | species | gender | DOB |
+-------+--------+---------+--------+------+
| snowy | tintin | pom
|m
| NULL |
| NULL |
+-------+--------+---------+--------+------+
2 rows in set (0.03 sec)
mysql> select * from pets where pets.name not in (select name from pets1);
+--------+---------+----------+--------+------------+
+--------+---------+----------+--------+------------+
| snowy2 | tintin1 | pom
|m
| NULL
| 2009-09-10 |
+--------+---------+----------+--------+------------+
2 rows in set (0.00 sec)
mysql>