Quantcast
Channel: Kevin Bedell on Internet Tech » how-to
Browsing all 5 articles
Browse latest View live

A Simple Example of a MySQL Stored Procedure that uses a cursor

(Save this to Del.icio.us!) What is a cursor and when should you use one? A ‘cursor’ in MySQL is essentially just the result set that’s returned from a query. Using a cursor allows you to iterate, or...

View Article



Basic How-To Example of a MySQL CREATE TABLE command

Here’s a basic example of a MySQL CREATE TABLE command. CREATE TABLE `foo`.`example_01` ( `field_1` VARCHAR(255), `field_2` CHAR(10), `field_3` INT(10), `field_4` BIGINT(20), `field_5` DATETIME );...

View Article

How-To MySQL CREATE TABLE Example showing default values, NULL values and...

This example shows how to set default values for each column — as well as how to allow (or not allow) NULL values in the column. By default, any column can contain NULL values. (Note that we’re also...

View Article

MySQL Integer sizes and ranges of values – How-To Create Table example

There are 5 different integer columns, each hold integer values of different sizes. Moreover, each can be signed or unsigned. If your value can’t ever be negative (for example, for an index), then you...

View Article

How to create a TIMESTAMP/DATETIME column in MySQL to automatically be set...

The TIMESTAMP data type is the only way to have MySQL automatically set the time when a row was inserted and/or updated. DATETIME columns can’t do this. TIMESTAMP columns are identical to DATETIME...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images