Edit C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\7.0.1\help\reference\flatfile.13.3.html
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <!-- MOTW-DISABLED saved from url=(0014)about:internet --> <title>Create and Drop Table Statements</title> <link rel="StyleSheet" href="css/flatfile.css" type="text/css" media="all" /> <link rel="StyleSheet" href="css/webworks.css" type="text/css" media="all" /> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/context.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/towwhdir.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/wwhpagef.js"></script> <script type="text/javascript" language="JavaScript1.2"> <!-- var WebWorksRootPath = ""; // --> </script> <script type="text/javascript" language="JavaScript1.2"> <!-- // Set reference to top level help frame // var WWHFrame = WWHGetWWHFrame("", true); // --> </script> <script type="text/javascript" language="JavaScript1.2" src="scripts/expand.js"></script> </head> <body class="" style="background-color: #FFFFEE;" onload="WWHUpdate();" onunload="WWHUnload();" onkeydown="WWHHandleKeyDown((document.all||document.getElementById||document.layers)?event:null);" onkeypress="WWHHandleKeyPress((document.all||document.getElementById||document.layers)?event:null);" onkeyup="WWHHandleKeyUp((document.all||document.getElementById||document.layers)?event:null);"> <br /> <div class="WebWorks_Breadcrumbs" style="text-align: left;"> <a class="WebWorks_Breadcrumb_Link" href="flatfile.13.1.html#106912">11 SQL Statements for Flat-File Drivers</a> : Create and Drop Table Statements</div> <hr align="left" /> <blockquote> <div class="head_1"><a name="106912">Create and Drop Table Statements</a></div> <div class="Body"><a name="106913">The flat-file drivers support SQL statements to create and delete database files. The Create </a>Table statement is used to create files and the Drop Table statement is used to delete files.</div> <div class="head_2"><a name="106916">Create Table</a></div> <div class="Body"><a name="106917">The form of the Create Table statement is:</a></div> <div class="syntax_first"><a name="106918">CREATE TABLE </a><span class="EquationVariables">table_name</span> (<span class="EquationVariables">col_definition</span>[,<span class="EquationVariables">col_definition</span>,...])</div> <div class="Body"><span class="EquationVariables"><a name="106919">table_name</a></span> can be a simple table name or a full path name. A table name is preferred for portability to other SQL data sources. If a table name is used, the file is created in the directory you specified as the database directory in the connection string. If you did not specify a database directory in the connection string, the file is created in the directory specified as the database directory in .odbc.ini. If you did not specify a database directory in either place, the file is created in the current working directory at connect time.</div> <div class="Body"><span class="EquationVariables"><a name="106920">col_definition</a></span> is the column name, followed by the data type, followed by an optional column constraint definition. Values for column names<span style="font-style: italic;"> </span>are database specific. The data type specifies a columnā??s data type.</div> <div class="Body"><a name="106921">The only column constraint definition currently supported by some flat-file drivers is "not </a>NULL." Not all flat-file tables support "not NULL" columns. In the cases where "not NULL" is not supported, this restriction is ignored and the driver returns a warning if "not NULL" is specified for a column. The "not NULL" column constraint definition is allowed in the driver so that you can write a database-independent application (and not be concerned about the driver raising an error on a Create Table statement with a "not NULL" restriction).</div> <div class="Body"><a name="106922">A sample Create Table statement to create an employee database table is:</a></div> <div class="syntax_first"><a name="106923">CREATE TABLE emp (last_name CHAR(20) NOT NULL, </a></div> <div class="syntax"><a name="106924"> </a> first_name CHAR(12) NOT NULL, </div> <div class="syntax"><a name="106925"> </a> salary NUMERIC (10,2) NOT NULL, </div> <div class="syntax"><a name="106926"> </a> hire_date DATE NOT NULL)</div> <div class="head_2"><a name="106929">Drop Table</a></div> <div class="Body"><a name="106930">The form of the Drop Table statement is:</a></div> <div class="syntax_first"><a name="106931">DROP TABLE </a><span class="EquationVariables">table_name</span> </div> <div class="Body"><span class="EquationVariables"><a name="106932">table_name</a></span> can be a simple table name (emp) or a full path name. A table name is preferred for portability to other SQL data sources. If a table name is used, the file is dropped from the directory you specified as the database directory in the connection string. If you did not specify a database directory in the connection string, the file is deleted from the directory specified as the database directory in .odbc.ini. If you did not specify a database directory in either of these places, the file is dropped from the current working directory at connect time.</div> <div class="Body"><a name="106933">A sample Drop Table statement to delete the emp table is:</a></div> <div class="syntax_first"><a name="106934">DROP TABLE emp</a></div> <script type="text/javascript" language="JavaScript1.2"> <!-- // Clear related topics // WWHClearRelatedTopics(); document.writeln(WWHRelatedTopicsInlineHTML()); // --> </script> </blockquote> <script type="text/javascript" language="JavaScript1.2"> <!-- document.write(WWHRelatedTopicsDivTag() + WWHPopupDivTag() + WWHALinksDivTag()); // --> </script> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de