Question: Requires following the attached assignment and submitting the output file. The objective is about following the instructions and spooling all output regardless of errors. To

Requires following the attached assignment and submitting the output file. The objective is about following the instructions and spooling all output regardless of errors.

To get the logging process started, just use the tee command at the MySQL client prompt, like this:

mysql> tee /targetFolder/my-output-file.

That command tells MySQL to log both the input and output of your current MySQL login session to a file named /targetFolder/my-output-file.

By using the --tee option when you invoke mysql, you can log statements and their output. All the data displayed on the screen is appended into a given file.

To disable tee-piping, i.e. not to output SQL results to log file, simply execute notee :

mysql> notee implies (Outfile) disabled

mysql > Create database YourLastNameHR;

  • If you make a mistake, you can (Drop Database DatabaseName:) or (Drop Database IF EXISTS DatabaseName). However, you are certain that DatabaseName: exist you can just use ((Drop Database DatabaseName:).

mysql > Use YourLastNameHR;

mysql > tee YourLastNameHR;

After the assignment is completed. Dont use (note) unless you are done for the day.

mysql > notee - this stops the piping of the output to the file.

mysql > CREATE TABLE employees (

id INT PRIMARY KEY AUTO_INCREMENT,

name VARCHAR(255) NOT NULL,

gender CHAR(1) NOT NULL,

contact_number VARCHAR(255),

age INT NOT NULL,

date_created TIMESTAMP NOT NULL DEFAULT NOW()

);

mysql > DESCRIBE employees;

(the command will show the employee's table structure)

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!