New topic: 

Database Record Delete Question

<http://forums.realsoftware.com/viewtopic.php?t=45706>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        jerryab          Post subject: Database Record Delete 
QuestionPosted: Wed Oct 24, 2012 3:01 pm                         
Joined: Mon Dec 12, 2011 7:25 pm
Posts: 102
Location: Grand Rapids MI Area                I have a database with a bunch of 
tables and records.

I want to delete all the records in a table but not the table its self.

The records in this table would be unknown except for the field names.

What is the best way to do this ? Can this be done with a wild card "*" ?      
_________________
iMac 27" (2.8GHz Intel Core i5, 16GB RAM, 1TB Drive) OS X Lion 10.7.3 and 
Windows 7
Toshiba Laptop Running Windows 7 & WinXP SP3
REAL Studio Enterprise Edition 2012r1
http://www.theultimatecampgroundlog.com
Being rewritten for the Mac  
                             Top                neonash7777          Post 
subject: Re: Database Record Delete QuestionPosted: Wed Oct 24, 2012 3:06 pm    
                     
Joined: Mon Nov 29, 2010 7:01 pm
Posts: 292                Truncate the table

Truncate tablename   
                             Top                markwalsh          Post 
subject: Re: Database Record Delete QuestionPosted: Wed Oct 24, 2012 3:43 pm    
                     
Joined: Wed May 20, 2009 4:43 pm
Posts: 897                jerryab wrote:I have a database with a bunch of 
tables and records.

I want to delete all the records in a table but not the table its self.

The records in this table would be unknown except for the field names.

What is the best way to do this ? Can this be done with a wild card "*" ?
If you don't specify a 'WHERE' clause, it will delete all records

DELETE from TableName      
_________________
RB 2009r4 Windows XP  
                             Top                jerryab          Post subject: 
Re: Database Record Delete QuestionPosted: Wed Oct 24, 2012 5:32 pm             
            
Joined: Mon Dec 12, 2011 7:25 pm
Posts: 102
Location: Grand Rapids MI Area                Thanks for the help guys.

I took out the WHERE.  Problem solved.      
_________________
iMac 27" (2.8GHz Intel Core i5, 16GB RAM, 1TB Drive) OS X Lion 10.7.3 and 
Windows 7
Toshiba Laptop Running Windows 7 & WinXP SP3
REAL Studio Enterprise Edition 2012r1
http://www.theultimatecampgroundlog.com
Being rewritten for the Mac  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to