source: MML/trunk/applications/database/mym/utilities/tbdrop.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 540 bytes
Line 
1function tbdrop(table)
2% TBDROP    Delete a MySQL table
3% INPUTS  : TABLE - table name, string
4% OUTPUTS : None
5% NOTE    : Use DBASE.TABLE syntax to refer to a table not in the
6%           current database
7% EXAMPLE : tbdrop('project1.old_data')
8% AUTHOR  : Dimitri Shvorob, dimitri.shvorob@vanderbilt.edu, 8/7/06
9if ~mycheck
10   error('No MySQL instance detected. Use MYOPEN to connect.')
11end
12try
13  mym(['drop table if exists ' table])
14catch
15  error(['Table ' table ' could not be deleted. Use TBLIST to list available tables.'])
16end
17   
Note: See TracBrowser for help on using the repository browser.