sql語句中distinct什么意思 數(shù)據(jù)庫中DISTINCT的作用是什么?
數(shù)據(jù)庫中DISTINCT的作用是什么?SQL select distinct語句可能在表中包含重復(fù)的值。這不是問題,但有時您可能只想列出不同的值。關(guān)鍵字distinct用于返回唯一的不同值。語法:se
數(shù)據(jù)庫中DISTINCT的作用是什么?
SQL select distinct語句可能在表中包含重復(fù)的值。這不是問題,但有時您可能只想列出不同的值。關(guān)鍵字distinct用于返回唯一的不同值。語法:select distinct column name from table name use distinct keyword如果要從“company”列中選擇所有值,則需要使用select語句:select company from orders“orders”表:company ORDERNAME IBM 3532 w3school 2356 apple 4698 w3school 6953結(jié)果:company IBM w3school apple w3school