In SQL, the aggregate function which will display the cardinality of the table is \(\_\_\_\_\_\).
Use count(*) when you need to determine the total number of rows in a table, regardless of whether they contain NULL values or not.
sum()
count(*)
avg()
sum(*)
In SQL, the count(*) function is used to count the number of rows in a table, which effectively gives the cardinality of the table. Other functions like sum() and avg() are used for numerical aggregations, not for counting rows.
\[ \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} \]
The SELECT statement when combined with \(\_\_\_\_\_\_\) clause, returns records without repetition.
myStr = "MISSISSIPPI" print(myStr[:4] + "#" + myStr[-5:])