Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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

WHERE keyword SQL

-- The WHERE keyword allows you to filter based on both text and numeric values in a table. 

-- There are a few different comparison operators you can use:
-- = equal
-- <> not equal
-- < less than
-- > greater than
-- <= less than or equal to
-- >= greater than or equal to

SELECT example_column
FROM example_table
WHERE example_column = 'example_value';
Comment

PREVIOUS NEXT
Code Example
Sql :: convert sql to linq c# online 
Sql :: how to uninstall mysql windows 10 
Sql :: how to create notes in mysql 
Sql :: current month transactions in mysql 
Sql :: missing index for constraint error in mysql 
Sql :: SQL AS With More Than One Column 
Sql :: identitye atama yapma SQL 
Sql :: sqlite column 
Sql :: salesforce soql get parents without children 
Sql :: oracle privileges 
Sql :: how to select only first 3 characters in sql 
Sql :: Serilog Table Configurations for MSSQLSERVER SINK 
Sql :: How to make PHP handeling my "WITH CTE as" SQL 
Sql :: mysql collation portugues brasil 
Sql :: SQL ANY and ALL Operators 
Sql :: MySQL Age Counter 
Sql :: oracle allow space to user 
Sql :: how to run parallel queries in sql server with entity framework 
Sql :: mysql zerofill 
Sql :: psql limit order group by 
Sql :: Provera dupliranih konatakata 
Sql :: mysql update all record removing 2 hours from column 
Sql :: dynamic pivot 
Sql :: SQL TABLE : SUBSCRIPTION, PRODUCT, SPECIFICATION 
Sql :: select count(*) from table 
Sql :: como hacer una consulta en sql 
Sql :: oracle c# multiple update sql 
Sql :: ms sql convert hijri to gregorian 
Sql :: unable to open database database.db file is encrypted or is not a database 
Sql :: restart sequence table mysql 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =