Question

Create the script for a table in the clinic database you made called Medicine and include...

Create the script for a table in the clinic database you made called Medicine and include the following columns: MedicineID, MedicineName, MedicineForm, MedicineCost, MedicineDose. Make the columns the appropriate data type and include any primary key and identity requirements. Add five rows of data to the table, using appropriate values. Provide the script here.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//to create table

CREATE TABLE Medicine(
MedicineId int IDENTITY(1,1) NOT NULL PRIMARY KEY,

MedicineName varchar(50) NOT NULL,

MedicineForm varchar(50),

MedicineCost float NOT NULL,

MedicineDose int,

);

//inserting five rows of data

INSERT INTO Medicine(MedicineId,MedicineName,MedicineForm,MedicineCost,MedicineDose)

VALUES (1,'Medicin1','tablet',2.60,2),

(2,'Medicin2','tablet',3.60,2),

(3,'Medicin3','capsule',4.60,2),

(4,'Medicin4','tablet',4.60,2),

(5,'Medicin4','liquid',6.60,2)

Add a comment
Know the answer?
Add Answer to:
Create the script for a table in the clinic database you made called Medicine and include...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a MySQL Database called “CSC306Class”. Create three (3) tables in the database called “studentInf”, “IntructorInf”,...

    Create a MySQL Database called “CSC306Class”. Create three (3) tables in the database called “studentInf”, “IntructorInf”, and “LikedAndDisliked”. Each table should consist of five columns that are relatable to the table name. Insert at least five row of data in each table. The data can be any information as long as it is related to the table name. Upload the codes to complete the above for grading. Extra Credit: If you were able to download and setup an php server...

  • 2. Write a script that implements the following design: In the Downloads table, the user_id and...

    2. Write a script that implements the following design: In the Downloads table, the user_id and product_id columns are the foreign keys. Create these tables in the ex schema. Create the sequences for the user_id, download_id, and product_id columns. Include a PL/SQL script to drop the table or sequence if it already exists. Include any indexes that you think are necessary. 3. Write a script that adds rows to the database that you created in exercise 2. Add two rows...

  • please write in python. thank you In this question you will be writing the code to...

    please write in python. thank you In this question you will be writing the code to carry out a query on a database table in Python. The CREATE command shown below is given just for your reference, so that you know the structure of the table and its columns. The database is an SQLite database in the file named taxa.sqlite. create table species ( id int primary key, genus varchar ( 5 0 ), species varchar(50), common_name char(100) ) Write...

  • QUESTION 11 Three questions require you to download the Medicine database MySQL dump (link in Quiz assessment folder) and import it into MySQL Based on the Medicines database you imported, complete t...

    QUESTION 11 Three questions require you to download the Medicine database MySQL dump (link in Quiz assessment folder) and import it into MySQL Based on the Medicines database you imported, complete the SQL statement below to add the table Locations to record the state (up to 6) a Manufacturer can operate in. When completing the statement, ensure you use the same naming conventions as other columns in the database and choose the most appropriate datatype. Your answer will be marked...

  • Using the MySQL Workbench create a new database using your design specifications Add at least 10...

    Using the MySQL Workbench create a new database using your design specifications Add at least 10 records to your tables. Note: Certain tables may not require 10 records and that is ok as long as your main tables have 10 or more Create MySQL statements that will retrieve all records or rows from the tables in your database Create 10 MySQL statements that will retrieve specified records or rows from one table in your database Create 10 MySQL statements that...

  • Help In Database: Next comes the data entry: Make up data for your database, or find...

    Help In Database: Next comes the data entry: Make up data for your database, or find real data. You can enter the data with INSERT statements, but it is much easier to use PhpAdmin. It has a form where you can type the data directly. Alternatively, you can use PhpAdmin to import CSV data (comma-separated values), which you can export from Excel. Include at least 3 rows in each of the entity relations, and as many rows as you need...

  • Write code for mySQL 1) create a new one database ; to create your table 2)...

    Write code for mySQL 1) create a new one database ; to create your table 2) Every table should have a primary key 3) Table relationship has to be based on foreign key and shown within your physical table 4) Insert 5 data records in every table 9) Create a database view that return result set of all record and all columns within all 6 table

  • I need help with the following SQL query for a company database (script given below). The...

    I need help with the following SQL query for a company database (script given below). The name of the Department. The number of employees working in that department. The number of different projects controlled by this department. The name of the project controlled by this department that has the maximum number of employees of the company working on it. The number of the above project. The cumulative sum of the number of employees of the company working on the projects...

  • SQL Create a database called MyMusician Create three tables, one named “User”, one named “Song”, and...

    SQL Create a database called MyMusician Create three tables, one named “User”, one named “Song”, and one named “Playlist”. The “User” table should have a column for userID (integer, autoincrement, not null, primary key), username, and password. It should also have one column for a foreign key we will assign later called “playlistID” (integer). The “Playlist” table should have a “playlistID” (integer, autoincrement, not null, primary key), and a column for a foreign key we will assign later called “songID”...

  • 3. Write a script that adds rows to the database that you created in exercise 2....

    3. Write a script that adds rows to the database that you created in exercise 2. Add two rows to the Users and Products tables. Add three rows to the Downloads table: one row for user 1 and product 2; one row for user 2 and product 1; and one row for user 2 and product 2. Use the SYSDATE function to insert the current date into the download_date column. Use the sequences created in the previous exercise to get...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT