Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. Can anyone point out how to check if a select query returns non empty result set? For example I have next query: SELECT * FROM service s WHERE s.service_id = ?; Should I do something like next: ISNULL(SELECT * FROM service s WHERE s.service_id = ?) to test if result set is not empty?

  2. 21 cze 2015 · I'm using a stored procedure in MySQL, with a CASE statement. In the ELSE clause of the CASE ( equivalent to default: ) I want to select and return an empty result set, thus avoiding to throw an SQL

  3. 6 cze 2024 · Managing null or empty values in SQL is a frequent task for database developers and administrators, as these values represent missing or undefined data. It’s essential to identify them to maintain data integrity and ensure accurate query results. In this tutorial, we’ll discuss different ways to retrieve rows containing such values.

  4. 10 paź 2011 · I have a simple query: SELECT name FROM atable WHERE a = 1 . I want it to return Null if it finds nothing, but it just returns an empty set. Is it possible to do this?

  5. 31 sty 2018 · CASE WHEN (SELECT 1 WHERE (1=1)) = 1 THEN 1 ELSE 0 END. My subquery is returning one row and hence compared to 1. This leads my CASE WHEN to produce the 1 output. Even if I set the subquery to return no rows like the sample below, the CASE statement returns the 0 result: SELECT.

  6. 10 kwi 2024 · I frequently use this approach when I want a query result returned when the base table is empty. I reproduced using your example. select coalesce(d.database_id,na.Database_ID) as DatabaseID,coalesce(d.name,na.name) as Name from (select 0 as Database_ID,’Empty’ as Name) as na left outer join sys.databases as d on d.database_id > 32766

  7. You only need the name of the column (or an expression) and the operator IS NOT NULL (in our example, the price IS NOT NULL). Put this condition in the WHERE clause (in our example, WHERE price IS NOT NULL), which filters rows. If the condition is true, it denotes the column doesn’t store a NULL.

  1. Ludzie szukają również