You can use **[BIT][1] type** which can have `1` or `0`, or also `NULL` if `NULL` is allowed.
**[BIT][1] type** converts:
- Any integer values except `0` to `1`.
- Any integer string values except `"0"` to `1`.
- `"0"` to `0`.
Then, you can create a table with **[BIT][1] type** as shown below:
```lang-none
CREATE TABLE doctor (
id INT IDENTITY,
name NVARCHAR(50),
on_call BIT, -- Here
PRIMARY KEY(id)
)
GO
```
Then, insert rows as shown below:
```mssql
INSERT INTO doctor
VALUES ("John", 1), ("Tom", 0), ("Lisa", "-23"), ("Kai", "0"), ("Bob", NULL)
GO
```
```lang-none
1> SELECT * FROM doctor
2> GO
id name on_call
-- ---- -------
1 John 1 <- 1
2 Tom 0 <- 0
3 Lisa 1 <- "-23"
4 Kai 0 <- "0"
5 Bob NULL <- NULL
```
[1]:
[To see links please register here]