Mysql数据更新和删除命令

插入数据
mysql> insert into customers(
cust_name
,
cust_address,
cust_city,
cust_state,
cust_zip,
cust_country,
cust_contact,
cust_email)
values('Pep E. LaPew',
'100 Main Street',
'Los Angles',
'CA',
'90046',
'USA',

NULL,

NULL),
('M.Martian',
'42 GALAXY Way',
'New York',
'NY',
'11213',
'USA',

NULL,

NULL);
更新某个列的新值
mysql> update products

-> set prod_id='ANV02' where prod_name='1 ton avail';
删除某个列的值
mysql> update products
-> set prod_price = null
where prod_id = 1000l;
删除某一个行的数据
mysql> delete from products
where cust_id = 10005;


你可能感兴趣的:(update,insert,galaxy,Products,customers)