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 '='
Fix error: mysqli_select_db / query expects 2 arguments, 1 given
Is faster one big SQL query or multiple small SQL queries ?
MySQL, MariaDB, SQLite, PostgreSQL, Oracle, MS SQL, DB2 - difference
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
Trending questions
Is correct to say that something is Reset, Reseted or Resetted ?
List of all english tenses with structure formula and examples
Remove or hide bottom navigation bar with buttons on Android
CPU 4nm, 3nm, 2nm difference. Is processor with lower NM better?
Is better beach Playa d'en Bossa, Figueretas or Talamanca in Ibiza ?
List of free email providers - emails without phone number verification
Man Month calculation - how many man days or man hours ?
2026 AnswerTabs
Terms
Contact us