Search
 
SCRIPT & CODE EXAMPLE
 

SQL

select query in sql

SELECT column_name FROM table_name;
Comment

select in select sql

SELECT column1 = (SELECT column-name FROM table-name WHERE condition),       column-names  FROM table-name WEHRE condition
Comment

sql select query

#sql select query

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 select statement

Projection = Select the columns in
a table that are returned by a query
Selection = Selects the rows in a
table that are returned by a query
Join = Brings together data that is 
stored in different tables by
specifying the link between them
Comment

PREVIOUS NEXT
Code Example
Sql :: hour differeence in mysql 
Sql :: sql server get number of working days in a month 
Sql :: default username and password for oracle 11g 
Sql :: min max in sql 
Sql :: sql lowest number possible 
Sql :: sql order by clause 
Sql :: sql timezone 
Sql :: what are the data types in sql 
Sql :: sql query to delete duplicate records 
Sql :: sqlstate[hy000] [2006] mysql server has gone away laravel 
Sql :: t sql return on letters only 
Sql :: mysql trigger to delete old data 
Sql :: Deleting data from tables 
Sql :: create a table 
Sql :: sql datetime functions 
Sql :: doctors appointment 
Sql :: sqlite3.OperationalError: near "7": syntax error 
Sql :: timestamp type in sql 
Sql :: mysql create trigger 
Sql :: Create table if not exist with exceptions 
Sql :: mysql drop tables 
Sql :: iterative instruction sql 
Sql :: how to install mysql without admin rights 
Sql :: mysql create index lost connection 
Sql :: postgresql interview questions 
Sql :: sqlalchemy core in clause 
Sql :: SQlite script 
Sql :: <connectionStrings <add name="MainDB" connectionString="Data Source=multidc02.its.com.pk,47328;Initial Catalog=ITSGeneralApplications;User ID=ITSGeneralAdmin;Password=TDsHn6TTyJohXCe"/ </connectionStrings 
Sql :: Is there a way to use read_sql_query and the query has WHERE column = Variable? 
Sql :: mysql installer no packages found 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =