Posts Tagged ‘mysql’

Creating Login Form using VB.NET 2008 and MySQL Database

The video helps you in connecting MySQL database to your VB.Net. Courtesy of youtube

read more

How to create a foreign key in a database table?

A foreign key is a field (or fields) that points to the primary key of another table. The purpose of the foreign key is to ensure referential integrity of the data. In other words, only values that are supposed to appear in the database are permitted. For example, say we have two tables, a CUSTOMER […]

read more

How to add a primary key in a database table?

A primary key is used to uniquely identify each row in a table. Primary keys can be specified either when the table is created (using CREATE TABLE) or by changing the existing table structure (using ALTER TABLE). CREATING TABLE WITH PRIMARY KEY SYNTAX: CREATE TABLE table_name(field_name datatype(index),…,field_nameN datatype(index),PRIMARY KEY(field_name_primary_key)); Say for example, you are going […]

read more

How to add a column in a database table?

When a table is already created in your database and suddenly you wanted to add additional columns into it, the question is how are you going to do it. Well, the answer to that is to use the ADD COLUMN command. ADD COLUMN is used to add a column to your existing table. Syntax: ALTER […]

read more

How to get information from a database?

What if you forget the name of a database or table, or what the structure of a given table is (for example, what its columns are called)? MySQL addresses this problem through several statements that provide information about the databases and tables it supports. You have previously seen SHOW DATABASES, which lists the databases managed […]

read more