I want to know if there is any way in SQL to identify a particular record if some column values changes
Ex:
TableA
| ID | DESIG | COMP |
|---|
| 1 | AST | ABC |
| 1 | ITA | DEF |
| 2 | SE | GHI |
| 3 | ASE-T | JKL |
| 3 | ASE | MNO |
| | |
suppose if i use select query like this : select id,<<chgflag>>, desig, comp from TableA;
i need out put like
1 TRUE AST ABC
1 FALSE ITA DEF
2 TRUE SE GHI
3 TRUE ASE-T JKL
4 FALSE ASE MNQ
basically i want to set the flag is true if id changes. and flase if not in order.