MySQL:尝试在ER模型中返回NULL值,但没有运气

时间:2017-08-01 17:08:08

标签: mysql null

我使用MySQL的ER模型创建了一个真实的表集。我试图进行连接,但似乎要么缺少某些东西,要么没有正确地执行它们以生成NULL值。以下是我创建的表格:

+----------------+-------------+------+-----+---------+-------+
| Field          | Type        | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| FilmNumber     | char(3)     | NO   | PRI | NULL    |       |
| FilmName       | varchar(60) | YES  |     | NULL    |       |
| OpeningDate    | varchar(20) | YES  |     | NULL    |       |
| TopBilledActor | char(60)    | YES  |     | NULL    |       |
| Genre          | varchar(20) | YES  |     | NULL    |       |
+----------------+-------------+------+-----+---------+-------+

+------------------+-------------+------+-----+---------+-------+
| Field            | Type        | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| CriticSiteNumber | char(3)     | NO   | PRI | NULL    |       |
| CriticSiteName   | varchar(30) | YES  |     | NULL    |       |
| CriticName       | char(50)    | YES  |     | NULL    |       |
+------------------+-------------+------+-----+---------+-------+

+------------------+---------+------+-----+---------+-------+
| Field            | Type    | Null | Key | Default | Extra |
+------------------+---------+------+-----+---------+-------+
| FilmNumber       | char(3) | YES  | MUL | NULL    |       |
| CriticSiteNumber | char(3) | YES  | MUL | NULL    |       |
| OverallScore     | int(5)  | YES  |     | NULL    |       |
+------------------+---------+------+-----+---------+-------+
3 rows in set (0.00 sec)

我的问题是,为了产生NULL值我需要什么类型的连接查询,或者我的表中的某些东西需要修改,因为我尝试的每个查询都不返回这些值。

0 个答案:

没有答案