Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql select where in

SELECT * FROM table_name WHERE country IN ('SPAIN', 'MEXICO');
Comment

SQL SELECT WHERE Clause

SELECT *
FROM Customers
WHERE last_name = 'Doe';
Comment

sql select where

SELECT * FROM table_name;
-- Sorting col1 ASCending then col2 DESCending
SELECT col1, col2 FROM table_name ORDER BY col1 ASC, col2 DESC;
-- Filter on col1
SELECT col1, col2 FROM table_name WHERE col1 = 'a value';
-- Containing 'searched'
SELECT col1, col2 FROM table_name WHERE col1 LIKE '%searched%';
-- All different values
SELECT DISTINCT col1 FROM table_name;
-- Simple sum
SELECT col1, sum(col2) FROM table_name GROUP BY col1;
Comment

sql where clause

SELECT column1, column2, ...                                                
FROM table_name
WHERE condition
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle session statistics 
Sql :: postgresql must appear in the GROUP BY clause or be used in an aggregate function 
Sql :: clear table sql 
Sql :: full join sql 
Sql :: how to pass dynamic column name in sql query 
Sql :: mysql create a user 
Sql :: sql server create database 
Sql :: create function in sql 
Sql :: Using GROUP BY in MySQL Join Table 
Sql :: grant all privileges database postgres to user 
Sql :: oracle sql sort ascending 
Sql :: mysql on duplicate key update get value from values 
Sql :: sql online 
Sql :: power query add row 
Sql :: json_value oracle 
Sql :: SQL BACKUP DATABASE for SQL Server 
Sql :: sql update 
Sql :: sql server version check 
Sql :: postgre query date 
Sql :: postgresql escape single quote 
Sql :: how to insert a uniqueidentifier in sql 
Sql :: postgresql delete all content 
Sql :: sql default value if null 
Sql :: how to select all fieldsin a soql query 
Sql :: postgresql select case insensitive 
Sql :: oracle undo tablespace list by user 
Sql :: import database mysql command line 
Sql :: union postgresql 
Sql :: DELETE DUPLICATE VALUES FROM A TABLE IN SQL SERVER 
Sql :: postgresql delete cascade 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =