Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started