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 ?
Difference between Fetch_assoc, Fetch_array, Fetch_row - MySQL
MySQL, MariaDB, SQLite, PostgreSQL, Oracle, MS SQL, DB2 - difference
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
List of all english tenses with structure formula and examples
CPU 4nm, 3nm, 2nm difference. Is processor with lower NM better?
Samsung Galaxy A & F better than M series ? What's the difference ?
Is Samsung Ultra camera better than Fold, Flip, regular S phones ?
Is PLS LCD display good ? Difference between PLS LCD and Amoled
5000 mAh battery charging time with 15W, 25W, 45W charger
Is correct to say that something is Reset, Reseted or Resetted ?
2026 AnswerTabs
Terms
Contact us