In India, one person can hold many demat accounts, and it is legal too. However, it is not allowed to open multiple demat accounts with the same brokerage firm. If the brokerage firm is offering full-time brokerage and discounted brokerage as two different entities (it shouldn’t be under the same name), then one can open multiple demat accounts with full-time brokers and discount brokers simultaneously.
Keep in mind that having multiple demat accounts can cause issues like managing multiple portfolios, multiple brokerage’s annual fee will be there, you need to log in to multiple accounts, etc.
However, if you are using one for investments and the second for trading, that is fine. Some of the investors also park their long term holdings in one account and use another for short to midterm holdings.
Note: HDFC securities and HDFC Sky is the same company, so you cannot open multiple accounts with them.