Monday, January 24, 2011

Assignment1 - Creating Database and table, inserting records, and selecting all records

 create database Frogs
  
 create table Wyoming_Species
  
      (
  
      Frog_ID int identity (1,1) PRIMARY KEY,
  
      Scientific_Name varchar (100),
  
      IUCN_Red_List_Status varchar (50),
  
      Vernacular_Name varchar (50),
  
      Family varchar(30)
  
      );
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Bufo baxteri', 'Extinct in the Wild(EW)', 'Wyoming Toad', 'Bufonidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Bufo boreas', 'Near Threatened(NT)', 'Western Toad', 'Bufonidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Bufo cognatus', 'Least Concern(LC)', 'Great Plains Toad', 'Bufonidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Bufo hemiophrys', 'Lese Concern(LC)', 'Canadian Toad', 'Bufonidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Bufo woodhousii', 'Least Concern(LC)', 'Woodhouse''s Toad', 'Bufonidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Psedacris maculata', 'Least Concern(LC)', 'Boreal Chorus Frog', 'Hylidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Rana catesbeiana', 'Least Concern(LC)', 'Bullfrog', 'Ranidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Ranna luteiventris', 'Least Concern(LC)', 'Columbia Spotted Frog', 'Ranidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Rana pipiens', 'Least Concern(LC)', 'Northern Leopard Frog', 'Ranidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Rana sylvatica', 'Least Concern(LC)', 'Wood Frog', 'Ranidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Spea bombifrons', 'Least Concern(LC)', 'Plains Spadefoot', 'Scaphiopodidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Spea intermontana', 'Least Concern(LC)', 'Great Basin Spreadfoot', 'Scaphiopodidae');
  
 Insert Into Wyoming_Species
  
 (Scientific_Name, IUCN_Red_List_Status, Vernacular_Name, Family)
  
 Values
  
 ('Ambystoma mavortium', ' ', 'Barred Tiger Salamander', 'Ambystomatidae');
  
 select *
  
 from Wyoming_Species  

No comments:

Post a Comment