Status
Not open for further replies.

googleplus

Active Member
294
2011
38
150
Hi,

I made a table dist_obj .

n37n6w.png


I havent put the 1st row details as i have not made any constraints on any row.

so it got left blank. So can u tell me how to update and insert to 1st row ?
and also delete it.

waiting for reply.
 
Last edited:
8 comments
INSERT INTO dist_obj (Dno, Dname, Daddress) VALUES (1, 'Yahoo', 'Funeral Home');

As your setting the number as 1 it will appear before Google and Bing as they are 12 and 13. You can also enter the below as an example.

INSERT INTO dist_obj (Dno, Dname, Daddress) VALUES (4, 'Ask', 'forgotten about');


You can delete yahoo as follows

DELETE FROM dis_obj WHERE Dno = 1

or as

DELETE FROM dis_obj WHERE Dname = 'Yahoo'

Hope this helps
 
I'm sorry I don't follow you. Can you give an example of what your trying to do.

Do you mean if something doesn't exist insert something? It that what you mean?
 
UPDATE dist_obj SET Dno = 11, Dname = 'test', Daddress = 'testing' WHERE Dno is null;

DELETE FROM dist_obj WHERE Dno is null;

:S
 
Status
Not open for further replies.
Back
Top