what role does public role have in sql
The public server role is not a fixed server role, because the permissions can be changed. The public server role is granted VIEW ANY DATABASE permission and the CONNECT permission on the default endpoints (TSQL Local Machine, TSQL Named Pipes, TSQL Default TCP, TSQL Default VIA). Members of the securityadmin fixed server role can grant both server-level and database-level permissions.