Get only one row if is not equals

i have my table:

ID | NAME | TYPE             
1  | A    | 1    
2  | A    | NULL  
3  | B    | NULL  
4  | C    | 2    
5  | D    | NULL 
6  | D    | NULL   

and i want to for example if i choose Type 1 i get the row but i want all the null values from the other.

ID | NAME | TYPE             
1  | A    | 1    
3  | B    | NULL  
5  | D    | NULL 
6  | D    | NULL   

sometime like this. i try with union but i get repeat A | NULL

thx for all

#sql #sql-server

What is GEEK

Buddha Community

Riley Lambert


ou seem to want:

select t.*
from t
where type = 1
union all
select t.*
from t
where type is null and
      not exists (select 1 from t t2 where = and t2.type = 1);

You don’t actually need the union all:

select t.*
from t
where type = 1 or
      (type is null and
       not exists (select 1 from t t2 where = and t2.type = 1)

How to Get Current URL in Laravel

In this small post we will see how to get current url in laravel, if you want to get current page url in laravel then we can use many method such type current(), full(), request(), url().

Here i will give you all example to get current page url in laravel, in this example i have used helper and function as well as so let’s start example of how to get current url id in laravel.

Read More : How to Get Current URL in Laravel

Read More : Laravel Signature Pad Example

#how to get current url in laravel #laravel get current url #get current page url in laravel #find current url in laravel #get full url in laravel #how to get current url id in laravel

Siphiwe  Nair

Siphiwe Nair


Big Data Follows One Farm, One Data Set Rule Overwhelming To Farmers

The digital world has transformed several businesses with significant impacts on data analytics. The vast type of knowledge available to view is expected to exceed 44 zettabytes by 2022 and has proved to have been of tremendous benefit to several sectors and big companies.

A few companies that get an advantage from big data consulting services are banking, airline, tourism, hospitality, automotive, athletic, entertainment industries, and even the farming sector. The collection could go on and on through big data could be a tremendous possession of an industry expert. By the end of 2021, the company’s acceptance of big data will go to 53 percent. Agriculture struggles to be symbiotic towards the business in the clarification of the information produced.

One industry that can enormously get profit from big data is the rural area. Indeed, the horticultural business likewise can utilize information from numerous points of view and advantage from it extraordinarily. Big data gets an inventive methodology in pretty much every area of the world, so for what reason would horticulture be given up.

Big data is quite an incredible power that it unquestionably can change the agricultural space. Today ranchers must comprehend and esteem innovation to settle on choices all the more rapidly and not linger behind the imaginative methodologies. As smart types of machinery and instruments yield up on farm statistics produce in huge amounts. Possibility, farming developments would develop to be progressively data-enabled as well as data-driven.

#agriculture #big data #latest news #big data follows one farm #one data set rule overwhelming to farmers #big data follows one farm, one data set rule overwhelming to farmers

Macey  Legros

Macey Legros


Java String Equals Example | String equals() In Java

In Java, objects of strings are immutable, so that means we cannot once the string is created. Now, if we have two strings and we want to compare them if they are the same or not, then we can use the equals()method.

Java String Equals Example

Java String equals() method compares the two given strings based on the content of a string.

If any character is not matched, then it returns false and if all characters are matched, it returns true.

  1. Java String equals() method overrides an Object class equals() method implementation.
  2. Java String is immutable, checking the equality of string to another object should be done using equals() method rather than == operator.
  3. String equals() method always returns a boolean value; it doesn’t throw any exceptions.
  4. The result of the equals() method is true if and only if an argument is not null, it’s the String object, represents the same sequence of characters as this string.

See the following syntax.


#java #java string equals #equals

What is the difference between = (single equal to) and == (double equal to)?

What is the difference between = (single equal to) and == (double equal to)?

  • The = (single equal to) is use to assign the value on the right to a variable
    on the left.

  • The == (double equal to) is use to compare to two values.

Explained By DDSRY

#difference between #singe equal to #double equal to #python #programming #developer

Lisa joly

Lisa joly


WOW Bitcoin Just hit $31K// My Top 10 Ways to Get More Bitcoin in 2021

Hey guys, in this video i talk about my top 10 ways to get more Bitcoin with what you currently have in your situation. It’s all about making some small sacrifices now and leverage BTC this year. Bitcoin is expected to smash through it’s All time high and have a massive bull run in 2021. A sense of urgency on your part is need if you want to take advantage of the current price of BTC now before it goes to $40k and beyond.

📺 The video in this post was made by Crypto expat
The origin of the article:
🔺 DISCLAIMER: The article is for information sharing. The content of this video is solely the opinions of the speaker who is not a licensed financial advisor or registered investment advisor. Not investment advice or legal advice.
Cryptocurrency trading is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!

#bitcoin #blockchain #get more bitcoin #wow bitcoin just hit $31k// my top 10 ways to get more bitcoin in 2021 #top get more bitcoin