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 "posttitle" as 'Intro to MYSQL and the "postdescription" 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
posttitle varchar
postdescription text
datetimecreated datetime
numberoflikes int
photo blob
Hint
Q
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 fields USERNAME VARCHAR FULLNAME VARCHAR HEADLINE VARCHAR
Tables Schema as Below:
PROFILE
columnName dataType
USERNAME VARCHAR
FULLNAME VARCHAR
HEADLINE VARCHAR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
