Answered step by step
Verified Expert Solution
Link Copied!

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 "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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Describe the investment planning process.

Answered: 1 week ago