Null and Void
Challenge:
Using the Shallow Grave SQL dump, which field(s) in the
users
table accepts NULL values? Submit the field name followed by the single command used to show the information (separated by a comma). Submit the flag asflag{column-name, command}
.Example:
flag{employee_id, SELECT}
Use the file from Address Book.
Solution:
Using the database I had created during Address Book challenge I reviewed the columns from the "users" table:
mysql> SHOW COLUMNS IN users;
+----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+----------------+
| user_id | int | NO | PRI | NULL | auto_increment |
| username | varchar(52) | NO | UNI | NULL | |
| first | varchar(52) | NO | | NULL | |
| last | varchar(52) | NO | | NULL | |
| middle | varchar(24) | YES | | NULL | |
| email | varchar(52) | NO | UNI | NULL | |
| street | varchar(52) | NO | | NULL | |
| city | varchar(52) | NO | | NULL | |
| state_id | int | NO | MUL | NULL | |
| zip | varchar(10) | NO | | NULL | |
| gender | varchar(8) | NO | | NULL | |
| dob | date | NO | | NULL | |
+----------+-------------+------+-----+---------+----------------+
12 rows in set (0.00 sec)
The field named "middle" allows NULL values, which makes the complete flag, flag{middle, SHOW COLUMNS IN users;}
Leave a comment