How to set a number by default using MYSQL

How to set a number by default using MYSQL

Let's say we have andatabase named: ExcelNovtech and a tables with the same name and we have a column called LimiteCarte and we want to set 10 000 as value by default .
Do the following:

create database excelnovtech;
use excelnovtech;

create table excelnovtech (
id INT(11) NOT NULL AUTO_INCREMENT,
depense double,
montantCompte double,
limiteCarte double default 1000,
PRIMARY KEY (id) )
ENGINE = InnoDB
AUTO_INCREMENT = 4
DEFAULT CHARACTER SET = utf8;

Here is an image:

Commentaires

Posts les plus consultés de ce blog

Men kijan pou voye MINUT NATCOM-NATCOM pou ZANMIW an 3 etap

Comment partager des minutes sur natcom

Men kijan pou prete kob, minutes, lajan nan men NATCOM Ayiti