After every 24 hours can I make an auto column for date in SQL - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Saturday, September 10, 2022

After every 24 hours can I make an auto column for date in SQL

Hello Guys all I wanted to know is can I make an auto column of datatype['date'] in SQL database after every 24 hours using codeigniter. I was willing to take attendance of students so instead of adding new row in attendance table against the same student_id every day I was hoping to make a new column in the same row every day for straight year. I used : $this->db->query('ALTER TABLE attendance ADD attendance_date date'); but attendance date is already in table so it says you cannot duplicate the column. Is there any way I can add column like : attendance_date_1 then attendance_date_2 so on to attendance_date_365 every day a single column column should be added against current_date automatically.



source https://stackoverflow.com/questions/73609710/after-every-24-hours-can-i-make-an-auto-column-for-date-in-sql

No comments:

Post a Comment