Question: consider two following sql tables: CREATE TABLE user ( user _ id int PRIMARY KEY, first _ name varchar ( 2 0 ) DEFAULT NULL,

consider two following sql tables:
CREATE TABLE user (
user_id int PRIMARY KEY,
first_name varchar(20) DEFAULT NULL,
last_name varchar(20) DEFAULT NULL
)
CREATE TABLE omment (
comment_id int PRIMARY KEY,
rate int DEFAULT NULL,
user_id int NOT NULL,
FOREIGN KEY(user_id) REFERENCES user(user_id)
)
now consider this rule: "The user's first and last name will not be completely displayed, only the first character of the first and last name will be shown."
add a sql constraint that supports this rule.

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!