Skip to content
WJunction - Webmaster Forum

SQL query help

Status
Not open for further replies.
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?
 
Status
Not open for further replies.

About the author

G
Active Member · Joined
294
Messages
38
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom