WANTAM.
01:37 AM 26/06/2025.
Well, I'll be damned. Today's learning literally begins tomorrow, haha. After spending the whole day fighting for my country both online and on the ground I needed a good rest, haha. #RUTOMUSTGO
Okay, moving on. So yesterday I did a it of reminder and tried to write up some code, together with learning GIT. I mean, so far so good. Kudos to myself. Let's begin;
How to update data;
UPDATE employees
SET hourly_pay = 21.21
WHERE employee_id = 6;
SELECT * FROM employees;
Remember to use the where clause so as to locate the set of data that you want to change, this would then update your NULL data that you might have left blank in the table. [YOU CAN ALSO REVERSE IT BACK TO NULL, HERE IS HOW;
UPDATE employees
SET hourly_pay = NULL;
WHERE employee_id = 6;
SELECT * FROM employees;
But if you wanted all of the rows within a column, you would exclude the WHERE clause. Then that would change the column to be one consisted value.
Okay, now moving on;
So quick rewind. How to delete row from a table, here is an example;
DELETE FROM employees
WHERE employee_id = 6;
SELECT * FROM employees;
Remember to add the WHERE clause, so as to avoid delete all of you data from the table.
02:44 AM.
Okay lads, I am avoiding writing long blogs lately. So I will be writing up just everything I remember on the top of my head.
Next one comes tomorrow/today. Goodnight.
SOCIAL SHARE CARD GENERATOR