Below is the description of the both.
def createTempView(viewName: String): Unit
Creates a local temporary view using the given name. The lifetime of this
temporary view is tied to the SparkSession that was used to create this Dataset
def registerTempTable(tableName: String): Unit
Registers this Dataset as a temporary table using the given name. The
lifetime of this temporary table is tied to the SparkSession that was used to create this Dataset.
![enter image description here]()
From the image you can see registerTempTable is deprecated in Spark 2.0. Means registerTempTable was the feature prior to Spark 2.0.