The SELECT statement when combined with \(\_\_\_\_\_\_\) clause, returns records without repetition.
Use DISTINCT in SQL queries to remove duplicate rows from the result set.
DISTINCT
DESCRIBE
UNIQUE
NULL
The DISTINCT clause in SQL is used to ensure that the results of a query do not contain duplicate rows. It filters out duplicate records from the output and ensures that each row in the result set is unique.
Example:
SELECT DISTINCT column_name FROM table_name;
This will return only unique values from the specified column. None of the other options (DESCRIBE, UNIQUE, or NULL) perform this functionality.
Differentiate between 'w' and 'a' file modes in Python.
\[ \begin{array}{|c|c|c|c|} \hline \textbf{S\_id} & \textbf{S\_name} & \textbf{Address} & \textbf{S\_type} \\ \hline S001 & Sandhya & Rohini & Day Boarder \\ S002 & Vedanshi & Rohtak & Day Scholar \\ S003 & Vibhu & Raj Nagar & NULL \\ S004 & Atharva & Rampur & Day Boarder \\ \hline \end{array} \]
\[ \begin{array}{|c|c|c|} \hline \textbf{S\_id} & \textbf{Bus\_no} & \textbf{Stop\_name} \\ \hline S002 & TSS10 & Sarai Kale Khan \\ S004 & TSS12 & Sainik Vihar \\ S005 & TSS10 & Kamla Nagar \\ \hline \end{array} \]
Write a function, c_words(), in Python that separately counts and displays the number of uppercase and lowercase alphabets in a text file, Words.txt
Ms. Veda created a table named Sports in a MySQL database, containing columns Game_id, P_Age, and G_name.
After creating the table, she realized that the attribute Category has to be added.
Help her to write a command to add the Category column.
Thereafter, write the command to insert the following record in the table: Game_id: G42 P\_Age: Above 18 G_name: Chess Category: Senior