Actually, the commands can not be compared because they will never be both in effect.
The command "switchport access vlan X" is in effect only if the port is in access mode (i.e. by issuing the "switchport mode access" command). If the port is in trunking mode, the command does not have any effect.
Your configuration example works but the command "switchport access vlan X" is ignored in your configuration because you have put the interface in trunking mode with 802.1Q frame tagging. On this trunk, only frames from VLANs X, Y and Z will be transmitted and received, all other will be dropped.
As a rule, commands starting with words "switchport access" have effect only if the port is in access mode. Similarly, commands starting with words "switchport trunk" are effective only if the port is in trunking mode.
The first configuration sets the port gi1/5 to static access mode and assigns it to the VLAN 100. This port send and accepts untagged frames only.
The second configuration sets the port gi1/5 to a trunk mode. By subsequent configuration, this trunk is limited to transporting the VLAN 100 only. So far, its apparent function is very similar to the first configuration. However, the frames sent and received on this port will be 802.1Q tagged. If an untagged frame is received, it is assigned to the native VLAN, which is VLAN1 by default.
There is a principial difference between an acess port and a trunk port, even if configured in such a way that both allow only a single VLAN to flow through it. An access port shall connect devices that belong to a single VLAN only, like PCs, printers, servers and so on. A trunk port shall connect to other switches or routers that are capable of transmitting frames of multiple VLANs through a single physical link. In order to distinguish between frames from different VLANs, each frame has to be tagged by its VLAN number. In essence, a trunk link is a multiplexed link and should interconnect devices that are capable of doing such multiplexing and demultiplexing and where it makes sense.
I am not sure if this tackles the point for you. Please ask further.
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...