Add Site or Add Page to Favorites
>

 MySQL client commands 

Preview DRM-free music
Play clips of the most popular DRM-Free music in MP3 format
Legal Music .com

Get information on your favorite TV Shows at TV Series .com

Clarify the meaning of the acronyms on your web site.

Acronym Dictionary

Acronym Finder

Social Networking Web Sites

Register your own domain name at A to Z Domains.

or buy domains at Domain Names For Sale .net


Printer-friendly PDF* format:

How To Guides for MySQL

This Section

"How To" Guides for MySQL

Start the Derby Interactive SQL Tool

java -cp "c:\jdk1.6.0_01\db\lib\derby.jar;c:\jdk1.6.0_01\db\lib\derbytools.jar" org.apache.derby.tools.ij
ij version 10.2
ij>

Show available commands

ij> help;

Connection commands

Create a database:

ij> connect 'jdbc:derby:C:/Documents and Settings/username/.derby/dbname;create=true';

To drop a database, simply remove the directory:

rmdir /s "%USERPROFILE%\.derby\dbname"

Connect to an existing database:

ij> connect 'jdbc:derby:C:/Documents and Settings/username/.derby/dbname';
ij> connect 'jdbc:derby:C:/Documents and Settings/username/.derby/dbname' as connname;

The default connection name is "CONNECTIONn", where n is numeric.

Show information about established connections:

ij> show connections;

Switch to a different connection:

ij> set connname;

Disconnect a connection:

ij> disconnect current;
ij> disconnect connname;

Schema commands

Create a schema

ij> create schema schemaname;
ij> create schema "SchemaName";

Show available schemas

ij> show schemas;

Change schemas

ij> set current sqlid schemaname;
ij> set current sqlid = "SchemaName";

Commands for Tables in Database

Show tables in schema

ij> show tables in sys;
ij> show tables in schemaname;
ij> show tables in "SchemaName";

Similarly, "views", "procedures" "synonyms" and "indexes" can also be displayed.

Show indexes for a table

ij> show indexes from tablename;
ij> show indexes from schemaname.tablename;
ij> show indexes from "SchemaName"."TableName";

Last updated Saturday January 31, 2009

You are currently viewing this page in HTML 5 XML* format (* see Clicklets for more infomation). This document is also available in XML* HTML 5 non-XML*XHTML 1 Style Sheet*HTML 5 Style Sheet* XHTML 1* HTML 4* XHTML 2* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.


Copyright © 2006 How To Guides .com. Alteration of content, including addition of any function such as hypertext links or pop-up advertising, or interference with the hypertext links or other functions of this site is expressly prohibited.

DISCLAIMER: All information, links, forms, applications and other items on this site or obtained from it are provided AS IS, WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.