Submitted by admin on Wed, 11/20/2013 - 10:51
1. Downloading, installing and configuring the database
See the installation and configuration note for your database.
2. Create table and insert data as:
Create table employee(empName varchar(20), id int PRIMARY KEY)
insert into employee values (‘name1’,1)
insert into employee values (‘name2’,2)
Submitted by heartin on Tue, 05/28/2013 - 03:44
We can define columns in databases which will auto increment its values whenever we add a new row. Different databases have different ways to do so and even call them differently like auto increment, identity column etc. We will discuss the auto increment for some databases here. Please feel free to add other database details that you know through the comments.
Auto Increment in MySQL
The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows:
Submitted by heartin on Fri, 05/24/2013 - 00:18
Submitted by heartin on Thu, 05/23/2013 - 08:50
Here we discuss examples for different cases of usage for stored procedures and stored functions. Please refer to the note on ‘Stored Procedures and Stored Functions in MySQL’ for more theory, details and explanations.
Submitted by heartin on Thu, 05/23/2013 - 08:37
A stored routine allow users to define a set of statements that they can later call together. Stored procedures and stored functions are the two types of stored routines in MySQL. A stored procedure takes in zero or more input parameters and runs specified SQL statements. A stored function takes in zero or more parameters, runs specified SQL, and returns exactly one scalar value.
Submitted by heartin on Fri, 05/17/2013 - 05:44
A trigger is a set of commands invoked automatically when an SQL statement changes data on the associated table. Other stored SQL types in MySQL are events, stored procedures, and stored functions.
Submitted by heartin on Sun, 04/14/2013 - 00:07
The WHERE clause lets you add further conditions on your query. We will see the use of WHERE clauses along with other clauses that will help us refine our queries in this section.
Submitted by heartin on Wed, 03/27/2013 - 21:41
DDL stands for Data Definition Language, and these queries are used to create or manipulate the structure of the database and schemas. Here we will see basic DDL queries that you will use in general. Please feel free to add more through the comments section.
Submitted by heartin on Sun, 03/17/2013 - 02:28
First we will look at some commonly asked questions based on the contents of this page. You can refer to getting-started-with-oracle-xe-and-jdbc-hands-On for setting up oracle xe and database for examples here: create 2 tables employee and emp, with 2 columns empName and id; and insert data with ids ranging from 1 to 5. You might have to use some common sense for some of the examples, like deleting/modifying duplicate data.
Submitted by heartin on Sat, 12/08/2012 - 19:40
The JDBC API is comprised of two Java packages: java.sql and javax.sql. The following are core JDBC classes, interfaces, and exceptions in the java.sql package: