Wednesday, January 26, 2011

Creating a database and table in SQL

 --drop database CoFrogs 
create database CoFrogs
go
use CoFrogs
create table Colorado
(
[id] int identity(1,1) not null primary key
,[ScientificName] varchar(50)
,[IUCNRedListStatus] varchar(20)
,[VernacularName] varchar(50)
,[Family] varchar(30)
)
Insert into Colorado
(ScientificName
,IUCNRedListStatus
,VernacularName
,Family)
values
('Bufo Boreas'
,'Near Threatened'
,'Western Toad'
,'Bufonidae')
Insert into Colorado
(ScientificName
,IUCNRedListStatus
,VernacularName
,Family)
values
('Bufo Cognatus'
,'Least Concern'
,'Great Plains'
,'Toad Bufonidae')
Insert into Colorado
(ScientificName
,IUCNRedListStatus
,VernacularName
,Family)
values
('Bufo debilis'
,'Least Concern'
,'Green Toad'
,'Bufonidae')
Insert into Colorado
(ScientificName
,IUCNRedListStatus
,VernacularName
,Family)
values
('Bufo punctatus'
,'Least Concern'
,'Red-Spotted Toad'
,'Bufonidae')
Insert into Colorado
(ScientificName
,IUCNRedListStatus
,VernacularName
,Family)
values
('Bufo woodhousii'
,'Least Concern'
,'Woodhouses Toad'
,'Bufonidae')
select * from Colorado

No comments:

Post a Comment