Question: Let us now write a query to let the user create a post on our platform. Write a SQL query to insert a new record

Let us now write a query to let the user create a post on our platform. Write a SQL query to insert a new record into the "post" table on our platform? The new entry should include the following details: set the "username" field as 'newton', the "post_title" as 'Intro to MYSQL', and the "post_description" as 'My First Post'. Kindly note that this post entry does not include any associated photo.
Tables Schema as Below:
post
columnName dataType
id int
username varchar(24)
post_title varchar (72)
post_description text
datetime_created datetime
number_of_likes int
photo blob
Hint
Q2.
SQL - Table Creation
easy
Let us start our journey by creating a 'PROFILE' table for storing the data of the users of our platform. Create a table profile with 3 fields ( USERNAME VARCHAR (24), FULL_NAME VARCHAR (72), HEADLINE VARCHAR (72)).
Tables Schema as Below:
PROFILE
columnName dataType
USERNAME VARCHAR (24)
FULL_NAME VARCHAR (72)
HEADLINE VARCHAR (72)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!