MySQL Help
#1

So I have a table named Cars, some cars are owned and there is a column named CarOwner, where the CarOwner value is 0 that means it is owned to the government or a faction, I want to delete any carOwner which is not valued as 0,
I want the cars with carOwner = 0 to stay in the column and other to be deleted.

Really got confused xD
Reply
#2

Код:
DELETE FROM `Cars` WHERE `CarOwner` > 0
This might help you.
Reply
#3

Quote:
Originally Posted by MattTucker
Посмотреть сообщение
Код:
DELETE FROM `Cars` WHERE `CarOwner` > 0
This might help you.
And If I want to do the same thing with 2 columns?
Reply
#4

If you want to delete a column from the table structure - that's what I understood.. -

Код:
 ALTER TABLE `tablename` DROP `columname`, `2nd-column-name`
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)