Check out example codes for "sql create table with datetime automatically". It will help you in understanding the concepts better.

Code Example 1

CREATE TABLE myTable ( col1 int, createdDate datetime DEFAULT(getdate()), updatedDate datetime DEFAULT(getdate()) )

Learn ReactJs, React Native from akashmittal.com