Question: I have the following two tables:

projects\_expended:

```
+---------------+------------+----------+
| project_name  | project_id | Utilised |
+---------------+------------+----------+
| CStreamTax    |          1 |     3500 |
| CStreamTravel |          2 |      149 |
+---------------+------------+----------+

```

projects:

```
+------------+---------------------+
| project_id | project_budgetstart |
+------------+---------------------+
|          1 |               15000 |
|          2 |               15000 |
|          3 |                 500 |
+------------+---------------------+

```

I would like to make a joint table of the two, but with the Utilised
field filled with `NULL` when a project\_id form the projects table does
not match one of the entries in the projects\_expended table.

My basic attempt was as follows:

```
SELECT projects.*, projects_expended.utilised
  FROM projects_expended
  JOIN projects
    ON projects.project_id = projects_expended.project_id;

```

And the result:

```
+------------+---------------------+----------+
| project_id | project_budgetstart | utilised |
+------------+---------------------+----------+
|          1 |               15000 |     3500 |
|          2 |               15000 |      149 |
+------------+---------------------+----------+

```

I understand why I get the result I get. But I'm pretty stuck with this.
I've made other attempts (too many to count).

Answer: 
`const` variable can be initalized with constant values (constant expressions).

---

* In `C`

At compilation time, `i + 1` is not a constant expression.

FWIW, even 

```
const int n = i;

```

will give you error, because, even if declared as `const`, `i` cannot be used as *constant expression* to be used as an initalizer to another `const`.

---

* In `C++`

`const` variables are tread as constant expression if they are initialized with constant expressions. So, this is allowed.
`static` variables need to be initialized with a constant.  

A C++ compiler will compile it because in C++ `const` qualified variables are constants. In C, `const` qualified variables are not constant and a C compiler will raise an error.