Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql query use select name inside where clause

You can not use aliased columns in a WHERE clause. You can try using a derived
table. Perhaps something like this (sorry, not tested):

select tblProgram.POIname from tblProgram
where 
  -- Use this if you only want to filter by the value.
  (select count(*) as alias_name from `fb_promo_codes_used`) < 2
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql load data infile default file location 
Sql :: sql server assembly 
Sql :: deny select insert update delete sql 
Sql :: check mysql password with docker container magento 2 
Sql :: having all mysql 
Sql :: distinct data types in a table sql query 
Sql :: sqdqsd 
Sql :: mariadb set vertical output format 
Sql :: como hacer una consulta de un registro que no esta en una tabla en mysql 
Sql :: for each row trigger postgresql 
Sql :: IN from in sql 
Sql :: how to take recent row without limit in mysql 
Sql :: get id if is not equal in certain table 
Sql :: SQL Copy Selected Columns Only 
Sql :: suse status MySQL 
Sql :: how to import datadd in sql 
Sql :: ring MySQL enable or disable the auto commit feature 
Sql :: split string update first value in sql server 
Sql :: primary key start from number 
Sql :: ORACLE RANGE DATE USING CONNECT BY PER WEEK,MONTHS,ETC 
Sql :: list foreign user mapping postgres 
Sql :: sql redshift split into first and last name 
Sql :: laravel How to find the password of mysql on desktop docker in laravel 
Sql :: inner join multiple conditions 
Sql :: how to check table engine in mysql 
Sql :: is there any limit of using joins in single mysql query ? 
Sql :: ring close the connection to the database using the odbc_disconnect() 
Sql :: mysql readable output 
Sql :: All Some Any 
Sql :: how to open database 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =