Skip to content

Commit 62b3c3b

Browse files
authored
Update README.md
1 parent f40332a commit 62b3c3b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,11 @@ TRUNCATE TABLE table_name;
214214
```
215215
ALTER TABLE table_name AUTO_INCREMENT = value;
216216
```
217+
>**_Left join:_**
218+
```
219+
SELECT a.id, a.name, a.genericname, b.category, c.name AS manufacturer, a.shelf, a.price, a.manufacturerprice, a.strength, d.unit
220+
FROM medicine AS a
221+
LEFT JOIN medicine_category AS b ON a.category = b.id
222+
LEFT JOIN manufacturer AS c ON a.manufacturer = c.id
223+
LEFT JOIN medicine_unit AS d ON a.unit = d.id;
224+
```

0 commit comments

Comments
 (0)