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?..


See Your Saved Posts Timeline

Views: 5058

.

+ 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

Any one tell me k in mn sy konsa option select krna ha or is ko Managemant studio k sath kesy connect krna ha

tell me soon .................

Attachments:

Kindly check this video (worthy 10 min of your's & you'll find entire assignment in this) to establish your server(should be your VU-ID).. 3rd Assignment ke hisaab se tamam tables bana lo.. initially sql queries ke zariye baqi access ki terha editor mein bhiee create kerseki ho.. phir 4th assignment easy lagay gi.. btw sql is fun, do spend some time with it :)

http://ca.proxfree.com/permalink.php?url=yx%2BhnYCyg4s24iThgBXg7eD%...

thanks for idea

please send me assignment solution cs403 very very soooooon
bc090402192
baloosweat.86@gmail.com

what we add in the CONSTRAINTS??

Abeera! I think hamein SQL query ke zariye aik table ki Primary Key to Doosray table se connect kerna hai jo doosray table ki foreign key kehlaiay gi... when you are finished with creating all tables then write 

ALTER TABLE Sale ADD FOREIGN KEY (CustomerID)

REFERENCES Customer(CustomerID)

in sql query (by clicking new query).. jab woh successfully run ho to snap shot lena.. baqi tamam links ms access ki terha dragging se diagram editor mein bana sekti ho app in SQL SERVER 2005 or any version of your choice :)

TABLES to Assignment 3 me banaliy the na laikin F-keys nahi ban rahi check..

when i enter as:

ALTER TABLE Sale
ADD CONSTRAINT CustomerID Foreign Key (CustomerID)
REFERENCES Customer (CustomerID);

Error as:

ALTER TABLE statement conflicted with COLUMN FOREIGN KEY constraint 'CustomerID'. The conflict occurred in database 'bCxxxxxxxxx', table 'Customer', column 'CustomerID'.

You should write following instead of yours... 

ALTER TABLE Sale ADD FOREIGN KEY (CustomerID)

REFERENCES Customer(CustomerID)

Note: I have done exactly same thing in SQL 2005

 

just guide me alter table separate table bany ga, ya pher inhain table main add ho ga

just aik file execute kar kay dikho

Abeera Butt

:D ....... ye btao ..... jo values dali hain attributes mein ..... sb tables mein same dali hain ya har table ki different? like VENDORID in table vendor and purchase .... both tables mein ail jaise records dalnein hain

RSS

Latest Activity

ùήķήόώή şόùĻ replied to ùήķήόώή şόùĻ's discussion Dard ..
44 seconds ago
+"illegal weapon"++ posted a discussion
2 hours ago
+"illegal weapon"++ replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Gham e Ashiqi tera shukriya...!
2 hours ago
+AH+ updated their profile
2 hours ago
+++Ayesha+++ replied to 2.O's discussion Voice Password :P :P
3 hours ago
+++Ayesha+++ updated their profile
3 hours ago
+ ! Ryan updated their profile
3 hours ago
Anu malik mcs updated their profile
3 hours ago

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

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