Answers for "how to insert date in mysql"

SQL
2

mysql insert value date

UPDATE personal set birthday = STR_TO_DATE('1-01-2012', '%d-%m-%Y') where birthday IS NULL;
Posted by: Guest on July-08-2021
2

insert current date in mysql

INSERT INTO my_table (last_updated) VALUES(NOW());
INSERT INTO my_table (last_updated) VALUES(sysdate);	-- Oracle
INSERT INTO my_table (last_updated) VALUES(getdate());	-- SQL Server
Posted by: Guest on April-05-2021
0

adding current date time in mysql query

2021-12-03 09:49:14
Posted by: Guest on November-08-2020
0

how to assign date field for table in mysql

CREATE TABLE people (
    id INT AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(50) NOT NULL,
    last_name VARCHAR(50) NOT NULL,
    birth_date DATE NOT NULL
);
Posted by: Guest on June-18-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language