Transistor with floating base
An ordinary BJT is a low input impedance current driven device. If there's no connection to the base, then base-emitter diode forward conduction/leakage will quickly take the base potential down to the emitter potential. The transistor will be off.
For collector/emitter voltages within its ratings, no significant current will flow. For voltages outside the ratings, eventually the transistor will break down, and at a lower voltage than it would have done with the base physically shorted to the emitter, due to collector/base diode reverse leakage.
To get anything interesting happening in a transistor with an open control terminal, it has to be a FET. They are high impedance voltage driven devices. If you take the gate to a potential, it will persist at that potential for some time, due to the low leakage and finite capacitance of the gate to the other electrodes. If you have a way of injecting and removing charge from this gate capacitance, then you can use it to store data, both digital (on/off) and analogue (how much on), for some time depending on the leakage x capacitance time constant.
As Brain pointed out in comments, things can also be interesting with a phototransistor. As it happens, all transistors are phototransistors, but most are packaged in opaque packages so are not sensitive to light. Way back when germanium was still the most popular transistor material, the easiest way to obtain a phototransistor was to scrape the black paint off the glass-tube-packaged OC71. Light excitation allows a current to flow across the reverse biassed collector/base junction, which is then amplified by the transistor beta. This is the reason transistors are often used rather than diodes as photodetectors, a far higher output current. The price to pay is that they tend to be much slower than a diode.