data base queries used for the basic of data base, Formulas and forms for Database Programming. A.T. Still University of Health Sciences (AZ/MO)
zohaib-hassan-1
zohaib-hassan-1

data base queries used for the basic of data base, Formulas and forms for Database Programming. A.T. Still University of Health Sciences (AZ/MO)

DOCX (1 MB)
6 pages
24Number of visits
Description
basic queries of dta base hahahahahahahahahahahahahahahahahaha
20 points
Download points needed to download
this document
Download the document
Preview3 pages / 6
This is only a preview
3 shown on 6 pages
Download the document
This is only a preview
3 shown on 6 pages
Download the document
This is only a preview
3 shown on 6 pages
Download the document
This is only a preview
3 shown on 6 pages
Download the document

Table creation

create table customer1( c_id int identity(1,1) primary key , c_name varchar(20) , c_contactName varchar(20) not null , c_adress varchar(30) , c_city varchar(15) not null, c_postal int not null , c_country varchar(10) not null , );

Record entry

insert into customer1(c_name,c_contactName,c_adress,c_city,c_postal,c_country) values ('umair','umair Hashmi','JPJ','gujrat','1234','Pak');

similar code use for entering more records

Show all records

select *from customer1

Countries whose name is pak

select *from customer1 where c_country='PAK'

Customer id greater than 4

select *from customer1 where c_id>4

Customer id between 2 and 4

select *from customer1 where c_id between 2 and 4

Customer sorting with city in desc

select *from customer1 order by c_city desc

Customer whose count is pak and city Sialkot

select *from customer1 where c_country='Pak' and c_city='sialkot'

Delete customer whose postal code is 1234

delete from customer1 where c_postal=1234

Update customer whose city is bhimber

update customer1 set c_name='Tayyab Rauf' where c_city='bhimber';

no comments were posted
This is only a preview
3 shown on 6 pages
Download the document