增 insert into Na () values ()
删delect from Na where ID='66'
改 update Na set -- where
查 select *(列) from Na
top and or where % [ ] order by left join on(以左边为主不关匹不匹配)
right join inner join full join
SELECT TOP 10 * FROM RO_SKUQuota
SELECT ID, YEAR, BpcsCode FROM RO_SKUQuota
SELECT TOP 10 * FROM RO_SKUQuota
SELECT TOP 1 * FROM RO_SKUQuota Where YEAR='2017'
UPDATE RO_SKUQuota set QuotaCTN = '38.00' WHERE ID = 'B4820FA1-EF43-40F1-B6EB-00CD93AB8109'
update RO_SKUQuota SET FK_RO_ReginCity_ReginCode = '66', BpcsCode= '88'
SELECT TOP 4 * FROM SystemUser
INSERT INTO RO_SKUQuota (ID, FK_RO_ReginCity_ReginCode, BpcsCode)VALUES ('B4820FA1-EF43-40F1-B6EB-00CD93AB8109' , '11', '33')
INSERT INTO RO_SKUQuota (ID, BpcsCode) VALUES ('BD96D371-AC81-4D27-92A6-018BA6AAF5D3', '09')
delete RO_SKUQuota where ID='BD96D371-AC81-4D27-92A6-018BA6AAF5D3'
DELETE FROM RO_SKUQuota WHERE BpcsCode='09'
select top 10 * from RO_SKUQuota
select distinct BpcsCode from RO_SKUQuota
select * from RO_SKUQuota where BpcsCode='88' or Year = '2017'
select * from RO_SKUQuota where BpcsCode='88' and Year = '2017'
select * from RO_SKUQuota where (BpcsCode='09' or QuotaCTN='33') and FK_RO_ReginCity_ReginCode = '66'
select * from RO_SKUQuota order by BpcsCode, OrderNumber
select BpcsCode, QuotaCTN, Year, Createtime from RO_SKUQuota order by Year
select * from RO_SKUQuota order by BpcsCode desc
select * From RO_SKUQuota order by BpcsCode asc
select * From RO_SKUQuota where BpcsCode like '0%'
select * From RO_SKUQuota where QuotaCTN like '33%'
select * from RO_SKUQuota inner join RO_ReginCity on (RO_SKUQuota.FK_RO_ReginCity_ReginCode=RO_ReginCity.ReginCode)
select * from RO_SKUQuota right join RO_ReginCity on (RO_SKUQuota.FK_RO_ReginCity_ReginCode=RO_ReginCity.ReginCode)
select * from RO_SKUQuota full join RO_ReginCity on (RO_SKUQuota.FK_RO_ReginCity_ReginCode=RO_ReginCity.ReginCode)
select * from RO_ReginCity left join RO_SKUQuota on (RO_SKUQuota.FK_RO_ReginCity_ReginCode=RO_ReginCity.ReginCode) where ReginCode = 'R07'