AnswerTabs
Computers
Programming
SQL
Ask question
Insert or update current date in DATETIME format - SQL
What SQL function should I use to insert or update current date in DATETIME format in table cell ? I tried to use GETDATE() but it is not working.
0
Report
07 Dec 2020 at 04:26 PM
Stor
Hi,
To insert actual date into table cell, you can try to use
NOW()
.
The SQL should look like:
INSERT INTO product_updates (id_update, id_product, id_user, date, status) VALUES (NULL, 10, 25, NOW(), 'new');
0
Report
Share
09 Dec 2020 at 10:07 AM
Tim
sql
1
answer
OK
Related questions
Error: Illegal parameter data types INT and row for operation '='
Is faster one big SQL query or multiple small SQL queries ?
Fix error: mysqli_select_db / query expects 2 arguments, 1 given
Difference between Fetch_assoc, Fetch_array, Fetch_row - MySQL
Copy and update rows in the same table with autoincrement - SQL
Fix SQL error Index for table 'user_db' is corrupted, try to repair it
MySQL error: Unknown table engine 'InnoDB' - how to fix ?
Trending questions
5000 mAh battery charging time with 15W, 25W, 45W charger
List of all english tenses with structure formula and examples
More protein in chicken,beef,lamb,pork,venison,turkey or fish meat ?
At sign @ or Exclamation mark ! before PHP function - meaning
20000mAh Powerbank - How many charges ? How long does it last ?
How to set fingerprint authentication to unlock an iPhone ?
Is correct to say that something is Reset, Reseted or Resetted ?
2026 AnswerTabs
Terms
Contact us