How to Create Table or Entity in Mysql Database????
In this Picture I tell you How to Create Table or Entity in MySQL database .If you see in this Picture step #4 show the button to create Table in Database and its alternate button is also show in circle
In this Picture We Describe that How to Write Table name without any space and its column with their type, length , index and Auto Increment option So To see this You can Create Table and its column with short and easy way step by step..
Step # 4 How to create Table in Mysql????
- Click on Create Button and Create Table here.. ...
- Now write the name of table at the top as shown in picture ...
- Table name separate by (-) or (_) but no space among two word..
- Now in next step we define table attribute or column name as we define in picture start with id..
- Every table has an id that is integer type and Length Define as 11 that is Default length for any integer type
- Id can be declare as primary key and auto increment...
- Primary key is unique key that can not be repeat and no be duplicate..
- To store any string or combination of string and integer in Database we define varchar type and length must define ...
- If type is varchar then length must be define otherwise error occur (this is not string)..
- To store text in Database we define type text that used to store text as you like and no length is define..
Description...
Hello Viewers Like in Previous lesson we learn How to Create Database step by step. In which we describe that in MySQL go to Database button and create database name and show it on left of PHPMYSQL page like in picture. Today I tell you How to crate table in Database step by step ... We click on create table button and a layout show like in this picture .So at the top of this we write the name of table . Table name must be differentiated by (-) or (_) but not by space .In next we go below where first we define table column id .In id we define its type integer and its length that is default 11 and and next we define its Index like primary key .Primary key is unique key that is not repeated .This unique key can be used to make relation among two or more table .When we make id as primary key then we check auto increment.Auto increment mean automatically assingned id when new record enter and increment one in previous id.If we not check auto increment then our id can be repeat and duplicate id error can be occur .So data can not inserted in database due to same unique key. In next step we write name that is string type so we select type varchar that is used for string type data or combination of string .At the end we write description so to store text as you like we define type TEXT and no length is define..
0 comments:
Post a Comment