https://teguhth.blogspot.com/2024/10/sample-database-erp-enterprise-resource.html
1. sample table customers
show create table customers\G
2. check table customers
select * from customers;
3. check value AUTO_INCREMENT berikutnya pada tabel customers
SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'customers';
4. coba insert normal & select
INSERT INTO customers (customer_name, email, phone, address) VALUES ('lisa', 'lisa@teguhth.com', '7418529630', '107 Park Ave');

5. ubah autoincremental
ALTER TABLE customers AUTO_INCREMENT = 200;
SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'customers';

INSERT INTO customers (customer_name, email, phone, address) VALUES ('lady lisa', 'ladylisa@teguhth.com', '7418529630', '107 Park Ave');
select * from customers;
SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'customers';





No comments:
Post a Comment