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
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 ?
SQL query with SELECT COUNT() in SELECT - subquery example
Trending questions
Is PLS LCD display good ? Difference between PLS LCD and Amoled
Remove or hide bottom navigation bar with buttons on Android
Man Month calculation - how many man days or man hours ?
Samsung Galaxy A & F better than M series ? What's the difference ?
How to calculate inverse currency exchange rate ?
How to change QWERTZ keyboard to QWERTY in Windows 10 ?
How to add side by side rows in excel pivot table ?
2024 AnswerTabs
Terms
Contact us