MySQL Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: MySQL Help (
/showthread.php?tid=536259)
MySQL Help -
VladimirMark - 08.09.2014
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
Re: MySQL Help -
MattTucker - 08.09.2014
Код:
DELETE FROM `Cars` WHERE `CarOwner` > 0
This might help you.
Re: MySQL Help -
VladimirMark - 08.09.2014
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?
Re: MySQL Help -
MattTucker - 08.09.2014
If you want to delete a column from the table structure - that's what I understood.. -
Код:
ALTER TABLE `tablename` DROP `columname`, `2nd-column-name`