Posts

Showing posts from October, 2013

Some Common Attributes of Columns in MYSQL Tables

PRIMARY KEY   It is a unique index where all key columns must be defined as  NOT NULL . If they are not explicitly declared as  NOT NULL , MySQL declares them so implicitly (and silently). A table can have only one  PRIMARY KEY . The name of a  PRIMARY KEY  is always  PRIMARY , which thus cannot be used as the name for any other kind of index. If you do not have a  PRIMARY KEY  and an application asks for the  PRIMARY KEY  in your tables, MySQL returns the first  UNIQUE  index that has no  NULL  columns as the  PRIMARY KEY . AUTO_INCREMENT The initial  AUTO_INCREMENT  value for the table. In MySQL 5.0, this works for  MyISAM  and  MEMORY  tables. It is also supported for  InnoDB  as of MySQL 5.0.3. To set the first auto-increment value for engines that do not support the AUTO_INCREMENT  table option, insert a  “ dummy ”  row with a value one ...

Physical Representation of MYSQL Tables

MySQL represents each table by an  .frm  table format (definition) file in the database directory. The storage engine for the table might create other files as well. For  InnoDB  tables, the file storage is controlled by the  innodb_file_per_table  configuration option. When this option is turned off, all  InnoDB  tables and indexes are stored in the  system tablespace , represented by one or more  ibdata* files . For each  InnoDB  table created when this option is turned on, the table data and all associated indexes are stored in a  .ibd file  located inside the database directory. For  MyISAM  tables, the storage engine creates data and index files. Thus, for each  MyISAM  table  tbl_name , there are three disk files. File Purpose tbl_name .frm Table format (definition) file tbl_name .MYD Data file tbl_name .MYI Index file

Create Procedure In MYSQL

The following example shows a simple stored procedure that uses an  OUT  parameter: delimiter // CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; END// delimiter ; And the below command use to call the above procedure : CALL simpleproc(@a);

Creating New Database in MYSQL

CREATE DATABASE db_name; It will create the new database in MYSQL.

MYSQL Tutorial Blogs Hub

Hi It is MYSQL tutorial blog that tells you and helps to find out all the queries related to MYSQL installation development  managment and thier support.
Hi It is MYSQL tutorial blog that tells you and helps to find out all the queries related to MYSQL installation development  managment and thier support.