What is the Difference Between Which and What?

🆚 Go to Comparative Table 🆚

The main difference between "what" and "which" lies in the number of possibilities they imply. Here are the key distinctions:

  • What: This word is used when there are lots of possible options or when the number of options is not known. It is typically used for non-defined sets of items. For example:
  • What is your favorite color?
  • What did you do at school today?
  • Which: This word is used when the answers are fewer or limited. It often refers to predefined or implied sets of items. For example:
  • Which of your children is going to ballet class?
  • Which flight are you taking to Atlanta?

Both "what" and "which" can be used as interrogative pronouns and determiners. However, "which" can also be used as a relative pronoun, connecting a dependent clause to an independent one. In some cases, both "what" and "which" can work perfectly well, especially when there are several options but not infinite choices.

Comparative Table: Which vs What

It seems that there is a misunderstanding in your question, as "which" and "what" are not related to table creation or database operations. If you meant to ask about the difference between "WITH" and "CREATE TEMPORARY TABLE" for creating temporary tables in SQL, I can provide that information.

  • WITH is used to create temporary tables for one-time use within a single query. You can reference the temporary table only in the query where it is defined.

  • CREATE TEMPORARY TABLE allows you to create temporary tables that can be referenced in multiple queries within the same session.

Here's a table summarizing the differences between WITH and CREATE TEMPORARY TABLE:

Feature WITH CREATE TEMPORARY TABLE
Query scope Single query Multiple queries within the same session
Reference Can only be referenced in the query where it is defined Can be referenced in multiple queries within the same session

Please provide more information if you meant to ask about a different topic related to tables or SQL operations.