Tubular lamp for exchangeable insertion into a luminaire which has, for the respective tubular lamp, two sockets (5, 6) at a distance from each other for holding the inserted tubular lamp, of which the one is designed as a power connection socket which serves for the power supply of the inserted tubular lamp, whilst the other is designed as a coding socket which serves to generate and/or transfer a coding signal correlated with the inserted tubular lamp to a control device for operating the inserted tubular lamp, said control device selecting the power supply appropriate for the inserted tubular lamp depending on the coding signal, - wherein the tubular lamp has a tubular lamp body which has at least one light source, - wherein, at the one end of the lamp body, the tubular lamp has a power connection base for the power supply of the respective light source, said power connection base being designed to be complementary to the power connection socket, - wherein, at the other end of the lamp body, the tubular lamp has a coding base, which is designed to be complementary to the coding socket and which interacts with the coding socket to generate and/or transfer the coding signal when a tubular lamp is inserted into the luminaire, - wherein at least one coding element is provided which is electrically connected to electrical base contacts (22, 23) of the coding base, said base contacts being electrically connected to electrical socket contacts (24, 25) of the coding socket when a tubular lamp is inserted into the luminaire, wherein the coding element determines the generatable and/or transferable coding signal, characterised in that - the coding base has the at least one coding element, - the coding base has a base housing which has the base contacts (22, 23) and contains the coding element - the two base contacts (22, 23) and the respective coding element are arranged on the insert element which represents a separate component with regard to the base housing and which is inserted into the base housing. - wherein the tubular lamp has a tubular lamp body which has at least one light source, - wherein, at the one end of the lamp body, the tubular lamp has a power connection base for the power supply of the respective light source, said power connection base being designed to be complementary to the power connection socket, - wherein, at the other end of the lamp body, the tubular lamp has a coding base, which is designed to be complementary to the coding socket and which interacts with the coding socket to generate and/or transfer the coding signal when a tubular lamp is inserted into the luminaire, - wherein at least one coding element is provided which is electrically connected to electrical base contacts (22, 23) of the coding base, said base contacts being electrically connected to electrical socket contacts (24, 25) of the coding socket when a tubular lamp is inserted into the luminaire, wherein the coding element determines the generatable and/or transferable coding signal, - the coding base has the at least one coding element, - the coding base has a base housing which has the base contacts (22, 23) and contains the coding element - the two base contacts (22, 23) and the respective coding element are arranged on the insert element which represents a separate component with regard to the base housing and which is inserted into the base housing.