The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 6 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
I'm working on the following questions but I their something wrong with my coding?
Â
can someone help me
Â
Â
4.Write the codeto createa new tableas shown below and createan indexon the Project_Namecolumn.
Â
Â
Table Name:Manager
Â
|
ColumnName: |
ManagerID |
Manager_Name |
Project_ID |
Project_Name |
|
KeyType: |
PrimaryKey |
 |
 |
 |
|
Null/Unique: |
Not Null |
 |
Not Null |
Not Null |
|
FKTable: |
 |
 |
 |
 |
|
FKColumn: |
 |
 |
 |
 |
|
DataType: |
INTEGER |
VARCHAR |
INTEGER |
VARCHAR |
|
MaxLength: |
7 |
30 |
7 |
30 |
Â
CREATE TABLE Manager (
      ManagerID INT (7) NOT NULL,
      Manager_Name VARCHAR (30),
      Project_ID INT (7) NOT NULL,
      Project_Name VARCHAR (30) NOT NULL,
      PRIMARY KEY (ManagerID)
        );
Â
Â
Â
Â
CREATE INDEX index_Project_Name ON Manager (Project_Name);
Â
5.Write the codeto createan indexon the Project_IDcolumn of the Manager table.
Â
           CREATE INDEX index_Project_ID ON Manager (Project_ID);
Â
6.Write the codeto removethe indexon the Project_Name column of the Manager table.
Â
MYSQL:Â Â
            ALTER TABLE Manager
            Drop INDEX index_Project_Name;Â
Â
Â
Â
SQL Server:
        Drop INDEX Manager.index_Project_Name;
Â
Â
Â
7.Write the codeto createa new tableas shown below and createasequenceon the Patient_ID column.
Â
Table Name:Patient
Â
|
ColumnName: |
Patient_ID |
P_Name |
 |
 |
|
KeyType: |
PrimaryKey |
 |
 |
 |
|
Null/Unique: |
Not Null, Unique |
NOT NULL |
 |
 |
|
FKTable: |
 |
 |
 |
 |
|
FKColumn: |
 |
 |
 |
 |
|
DataType: |
INTEGER |
VARCHAR |
 |
 |
|
MaxLength: |
7 |
30 |
 |
 |
Â
           CREATE TABLE Patient (
             Patient_ID INT (7) NOT NULL UNIQUE PRIMARY KEY,
            P_Name VARCHAR (30) NOT NULL
           );
           CREATE INDEX index_Patient_ID ON Patient(Patient_ID);
Â
Â
Â
Attachments:
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly