Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

insert date in mysql table code example

Example 1: mysql insert datetime

-- If you just need to insert the current DateTime: --
INSERT INTO yourtable (`DateTimeFieldName`) VALUES (NOW());

Example 2: 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
);

Tags:

Sql Example

Related

r dataframe set column names code example how to access string elements using index number in Javascript code example string.toupper in java code example how to output c++ code example laravel uri segment code example css any sibling code example random on c++ code example how to get python on ubuntu code example how to hide api key in javascript code example how to push a local repository to github code example flutter icons with assets code example how to create a directory in ubuntu terminal code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy