Re: Newbie question about BIGINT and INT in the same table

From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Sat, 26 Oct 2019 18:31:52 +0100
Message-ID: <qp1vu8$p6d$1_at_dont-email.me>


On 26/10/2019 18:16, ^Bart wrote:
> Hello guys!
>
> I know, it's a nebwie question and I'd like to say sorry before write
> it! :)
>
> I created a table like this:
>
> CREATE TABLE users
> (
> id_user BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
> name VARCHAR(25),
> surname VARCHAR(25),
> FK_id_city INT(10) UNSIGNED NOT NULL,
> INDEX (FK_id_city),
> FOREIGN KEY (FK_id_city) REFERENCES cities (id_city)
> )
> ENGINE=INNODB;
>
> When I think to a database I think it's like a excel/calc sheet but I
> don't understand how I can have the column BIGINT where I can insert
> data till 100 and INT column where I can insert data till 60 (I know
> differences between BIGINT and INT it's not what I wrote but it's just
> and example!)
>
> If I insert data over 60 could I have an issue? Should I have eveything
> INT or BINGINT?
>
> ^Bart

[Quoted] [Quoted] Study this page until you understand MySQL data types. It sounds like you do not, yet :-)

https://www.w3schools.com/sql/sql_datatypes.asp

-- 
"Women actually are capable of being far more than the feminists will 
let them."
Received on Sat Oct 26 2019 - 19:31:52 CEST

Original text of this message