“SQL existe” Réponses codées

Si existe SQL Server

IF EXISTS (SELECT * FROM tblGLUserAccess WHERE GLUserName ='xxxxxxxx') 
BEGIN
   SELECT 1 
END
ELSE
BEGIN
    SELECT 2
END
Amused Angelfish

SQL existe l'opérateur

SELECT column_name(s)
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);
Testy Tiger

SQL existe

SELECT customer_id, first_name
FROM Customers
WHERE EXISTS (
  SELECT order_id
  FROM Orders
  WHERE Orders.customer_id = Customers.customer_id
);
SAMER SAEID

Réponses similaires à “SQL existe”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code