Replace \begin{table}with \@float{table}and replace \end{table}with \end@float.
\@floatand \end@floatare internal LaTeX commands for starting and ending a floating point environment.
№2. (\gdef\mycaption{#2}) \caption{\mycaption} . \def\mycaption{\relax} \begin{defaultTable}.
, \@float \end@float @ , ( .sty), \makeatletter \begin{defaultTable}, \makeatother \end{defaultTable}.