sqlite3 now 1

sqlite3 now

//Date
DATE('now')

//DateTime
DATETIME('now')

Here is what the above code is Doing:
1. We’re creating a new table called “users” with the following columns:
– id: an integer that will be automatically generated for us
– email: a string with a max length of 128
– first_name: a string with a max length of 128
– last_name: a string with a max length of 128
– password: a string with a max length of 128
– created_at: a datetime that will be automatically generated for us
– updated_at: a datetime that will be automatically generated for us
2. We’re creating a new table called “messages” with the following columns:
– id: an integer that will be automatically generated for us
– user_id: an integer that will be a foreign key referencing the “users” table
– message: a string with a max length of 255
– created_at: a datetime that will be automatically generated for us
– updated_at: a datetime that will be automatically generated for us

Similar Posts