Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » General » Downloads
 
Add your own
alternative version
Go to top

DarkSide SQL Mini Version 1, The embedded database

, 23 Mar 2006
An embedded database library in C++.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Create Table</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --> 
<link href="ss.css" rel="stylesheet" type="text/css">
<!-- InstanceEndEditable --> 
</head>

<body bgcolor="#FFFFFF" text="#666666">
<table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC">
  <tr> 
    <td bgcolor="#CCCCCC"><h3><font color="#999999">DarkSide SQL Mini Help</font></h3></td>
  </tr>
</table>
<table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC">
  <!--DWLayoutTable-->
  <tr> 
    <td width="164" height="305" valign="top"><table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC">
        <tr> 
          <td><a href="index.htm">Home</a></td>
        </tr>
        <tr> 
          <td><a href="intro.htm">Introduction</a></td>
        </tr>
        <tr> 
          <td><a href="using.htm">Using The Library</a></td>
        </tr>
        <tr> 
          <td><a href="api_ref.htm">API Reference</a></td>
        </tr>
        <tr> 
          <td><strong>SQL Commands</strong></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_ct.htm">CREATE TABLE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_dd.htm">DROP DATABASE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_dt.htm">DROP TABLE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_use.htm">USE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_i.htm">INSERT</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_u.htm">UPDATE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_d.htm">DELETE</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_s.htm">SELECT</a></div></td>
        </tr>
        <tr> 
          <td><div align="center"><a href="sql_o.htm">OPTIMIZE</a></div></td>
        </tr>
        <tr> 
          <td><a href="types.htm">Data Types</a></td>
        </tr>
        <tr> 
          <td><a href="oprs.htm">Operators</a></td>
        </tr>
        <tr>
          <td><a href="bugs.htm">Bugs</a></td>
        </tr>
        <tr> 
          <td><a href="lic.htm">License</a></td>
        </tr>
        <tr> 
          <td><a href="tps.htm">Third-party software</a></td>
        </tr>
        <tr> 
          <td><a href="abt.htm">About</a></td>
        </tr>
      </table></td>
    <!-- InstanceBeginEditable name="txt" -->
    <td width="398" valign="top"><p><strong>CREATE TABLE</strong></p>
      <p>CREATE TABLE is the most important data definition command provided by 
        DarkSide SQL Mini. This command helps you define a layout to store your 
        data. The syntax of this command is as follows:</p>
      <p><font color="#990000">CREATE TABLE table_name(column_name1 datatype constraint,column_name2 
        datatype constraint...)</font></p>
      <p>Here, &quot;table_name&quot; and &quot;column_name&quot; can be any valid 
        identifier. For a list of data types you can use, see <a href="types.htm">Data 
        Types</a>.</p>
      <p>Eg:<br>
        <br>
        <code>create table books(id autoid indexed,title varchar(80),author char(30),date_of_pub 
        date,price float) </code></p>
      <p>DarkSide SQL Mini support three constraints on a field:<br>
        <br>
        <font color="#990000">1. Unique:</font> The database will raise an error 
        if you try to insert a duplicate value in this field.<br>
        <br>
        <font color="#990000">2. Indexed:</font> The database will maintain an 
        index file for this field for faster data lookup. All unique fields are 
        indexed by default.<br>
        <br>
        <font color="#990000">3. Not Null:</font> &quot;NULL&quot; is a special 
        value that can be stored by any field. It represents unknown or undefined 
        data. The user cannot leave a &quot;NOT NULL&quot; field with a NULL value. 
        He must enter some value that is valid for the field's data type.Unique 
        and Indexed fields are NOT NULL by default.<br>
      </p>
      <p>&nbsp; </p></td>
    <!-- InstanceEndEditable --></tr>
  <tr> 
    <td height="58" colspan="2" valign="top"><div align="center">&copy; 2003 <a href="mailto:vijaymathewp@yahoo.co.in">LogicMatrix</a></div></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 23 Mar 2006
Article Copyright 2003 by AnOldGreenHorn
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid