Jump to content

Recommended Posts

hi friends what is it that im doing wrong that im unable to create table inside the company database?

 

 

create database company;

 

use company;

 

create table employee(first_name text(30), last_name text(30), address text(500), phone int(13), designation text(50);

 

  :confused:

You will also find that int(13) won't work for a couple of reasons. INT(11) is the biggest normal integer and that includes a +/- sign as the 11th character. For the signed integer you are trying to make, the highest area code would be 214 and if you make it unsigned, 429 would be the highest area code you could store.

 

Phone numbers are not actually numbers, they are formatted strings consisting of numeric digits.

When you need to store a number in mathematical sense of this word.

Phone numbers, zip codes, social security numbers are not numbers in mathematical sense. They're strings composed of digits. You do not add/compare/divide them. You do not need a mean of telephone numbers or maximum of zip codes

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.