20220329 º¹½À



select * from product order by idx asc/desc limit 0,10;

-> idx ¿­À» ±âÁØÀ¸·Î ¿À¸§/³»¸²Â÷¼øÀ¸·Î Á¤·Ä.
-> 0¹ø indexºÎÅÍ 10°³ÀÇ ¸ñ·Ï ºÒ·¯¿À±â.

ÆäÀÌ¡ °³³ä

[1] start : 0 , end : 10 (1~10ÀÇ µ¥ÀÌÅÍ°¡ ÂïÈû)
[2] start : 10 , end : 10 (11~20)
[3] start : 20 , end : 10 (21~30)

select count(*) from product;

-> product Å×À̺íÀÇ ¸ðµç ·¹ÄÚµåÀÇ °³¼ö¸¦ ±¸Çϱâ

searchDB();

-> °Ë»öÇÑ °Ë»ö¿¡ ¸ÂÃç¼­ select ÇÏ´Â ¸Þ¼­µå


product Å×ÀÌºí »ý¼º

create table product(
idx int(10) not null auto_increment,
productId varchar(10) not null,
pname varchar(10) not null,
unitPrice int not null,
description varchar(10) not null,
manufacturer varchar(10) not null,
category varchar(10) not null,
unitInStock int not null,
conditions varchar(10) not null,
primary key(idx)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;