Create the following table in your database with the following schema: Table: Patients | Column Name | туре | I patient id I patient_name | varchar | | conditions | int | varchar | +- -------+ patient...


Write all the sql code (including create, insert and select)


Create the following table in your database with the following schema:<br>Table: Patients<br>| Column Name<br>| туре<br>|<br>I patient id<br>I patient_name | varchar |<br>| conditions<br>| int<br>| varchar |<br>+-<br>-------+<br>patient id is the primary key for this table.<br>'conditions' contains 0 or more code separated by spaces.<br>This table contains information of the patients in the hospital.<br>Add the following data to your tables:<br>Input:<br>Patients table:<br>+----<br>+--<br>I patient_id | patient_name | conditions<br>+-<br>| 1<br>| 2<br>| 3<br>| 4<br>| 5<br>| Daniel<br>| Alice<br>| Bob<br>| George<br>| Alain<br>| YFEV COUGH<br>| DIAB100 MYOP |<br>| ACNE DIAB100 |<br>| DIAB201<br>Write an SQL query to report the patient_id, patient_name all conditions of patients who have Type I<br>Diabetes. Type I Diabetes always starts with DIAB1 prefix<br>Return the result table in any order.<br>The result should be:<br>Output:<br>+-<br>I patient_id | patient_name | conditions<br>+--<br>| 3<br>4<br>| Bob<br>| George<br>| DIAB100 MYOP |<br>| ACNE DIAB100 |<br>+-<br>

Extracted text: Create the following table in your database with the following schema: Table: Patients | Column Name | туре | I patient id I patient_name | varchar | | conditions | int | varchar | +- -------+ patient id is the primary key for this table. 'conditions' contains 0 or more code separated by spaces. This table contains information of the patients in the hospital. Add the following data to your tables: Input: Patients table: +---- +-- I patient_id | patient_name | conditions +- | 1 | 2 | 3 | 4 | 5 | Daniel | Alice | Bob | George | Alain | YFEV COUGH | DIAB100 MYOP | | ACNE DIAB100 | | DIAB201 Write an SQL query to report the patient_id, patient_name all conditions of patients who have Type I Diabetes. Type I Diabetes always starts with DIAB1 prefix Return the result table in any order. The result should be: Output: +- I patient_id | patient_name | conditions +-- | 3 4 | Bob | George | DIAB100 MYOP | | ACNE DIAB100 | +-

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here