You can't access a SQL database/table from Javascript client-side in a web browser. You may be able to find an ActiveX control to do this... but that's going to be a solution that will lock out all non-Windows, non-IE users.
Since you have said you are using SQL, why not write a stored procedure that "truncates" the table as part of an "initialisation" process? Be aware, that if you do this, then how will you deal with multiple users performing the task simultaneously?
Jeff