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
MySQL, MariaDB, SQLite, PostgreSQL, Oracle, MS SQL, DB2 - difference
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
Is correct to say that something is Reset, Reseted or Resetted ?
Man Month calculation - how many man days or man hours ?
5000 mAh battery charging time with 15W, 25W, 45W charger
How much electricity does laptop use per day? Cost of laptop usage.
CPU 4nm, 3nm, 2nm difference. Is processor with lower NM better?
How to browse X.com posts without account ? "X" profile viewer
Recently viewed questions
What does @ mean before PHP function ? PHP mail vs. @mail
Does solar panel work with sunlight through glass / window ?
Best free web AI tools for Image adjusting and sharpening
Can I charge phone directly from solar panel ?
Why is WTI crude oil more expensive than Brent ?
2026 AnswerTabs
Terms
Contact us