Computer Science
What will be the output of the query ?
SELECT * FROM products WHERE product_name LIKE 'App%';
- Details of all products whose names start with 'App'
- Details of all products whose names end with 'App'
- Names of all products whose names start with 'App'
- Names of all products whose names end with 'App'
Answer
Details of all products whose names start with 'App'
Reason — The SELECT *
statement indicates that every column of data should be returned for each matching record. It uses the LIKE
operator with the pattern 'App%', where the %
wildcard represents any sequence of characters. Therefore, this query will return details of all products from the products
table where the product_name
starts with 'App', including any characters that may follow.
Related Questions
What will be the output of the following code ?
c = 10 def add(): global c c = c + 2 print(c, end = '#') add() c = 15 print(c, end = '%')
- 12%15#
- 15#12%
- 12#15%
- 12%15#
Which SQL command can change the degree of an existing relation ?
In which datatype the value stored is padded with spaces to fit the specified length.
- DATE
- VARCHAR
- FLOAT
- CHAR
Which aggregate function can be used to find the cardinality of a table ?
- sum()
- count()
- avg()
- max()