We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

1. SQL query to enter data in to database

INSERT INTO Customer
VALUES ('001''Umair','M.A Jinnah road', '021xxx','021xxx','umair@live.com','imp','KHI')

2. Establishing Foreign key constraint

ALTER TABLE Sale ADD FOREIGN KEY (CustomerID)
REFERENCES Customer(CustomerID)

3. Sorting Sale Table in ascending Order

SELECT SaleID, CustomerID, InvoiceDate, InvoiceNumber, Discount, Description
FROM Sale
ORDER BY CustomerID ASC

&

SELECT SaleID, CustomerID, InvoiceDate, InvoiceNumber, Discount, Description
FROM Sale
ORDER BY InvoiceNumber ASC

4. Count number of rows from Purchase where discount > 10

SELECT COUNT(*) as "rows where discount is greater than 10"
FROM Purchase
WHERE Discount > 10;

NOTE: Those using windows 7 on their pc's should install "SQL SERVER MANAGEMENT STUDIO EXPRESS 2005" or newer version of same application coz server studio 2000 windows 7 ke saath problem kerta hai.

+ Click Here To Join also Our facebook study Group.

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?


See Your Saved Posts Timeline

Views: 5059

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

Replies to This Discussion

Attention all those student who facing problem in alter table command, 

you must add those fields in table who want to add as a foreign key,

 

salam
my third assignmeny was expired
so i've no idea about sql
plz tell me how can i install sql server and use it.with win 7

Can any one tell me how can we show relation between tables in sql server 2000 ?? I have established relation between tables but don't know how to show it in a diagramatic way? Plz help me out! 

Got a question yar, foreign key tables banatay waqt declare kren gy ? i mean k ek table ki primary key ko dusray table mein as attribute include krengy aur fir altar command k zriye constraint dengy ? ya fir just end mein altar statement k zariye foreign key constraint declare krengy ? Plz explain, Stay blessed !


thanks alot for help everybody :D

RSS

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service