SQL Insert für jeden bestimmten Wert
insert into your_table (col1, col2, col3)
select distinct col1, 'newval', col3
from your_table
DeuxAlpha
insert into your_table (col1, col2, col3)
select distinct col1, 'newval', col3
from your_table
DISTINCT
- select distinct * from employees; ==>
retrieves any row if it has at
least a single unique column.
- select distinct first_name from employees; ==>
retrieves unique names
from table. (removes duplicates)
- select distinct count(*) from employees;
retrieve number of unique rows
if any row has at least a single unique data.
SELECT DISTINCT col1, col2, ....
FROM table_name;
SELECT col1, MIN(col2)
FROM table_name
GROUP BY col1;