An expression can also be a part of the condition in the WHERE clause : Where « Select Query « SQL Server / T-SQL






An expression can also be a part of the condition in the WHERE clause

1> CREATE TABLE project   (project_no   CHAR(4) NOT NULL,
2>                         project_name CHAR(15) NOT NULL,
3>                         budget FLOAT NULL)
4>
5> insert into project values ('p1', 'Search Engine',        120000.00)
8> GO

(1 rows affected)
1> -- An expression can also be a part of the condition in the WHERE clause
2>
3> SELECT project_name FROM project WHERE budget*0.51 > 60000
4> GO
project_name
---------------
Search Engine
SQL

(2 rows affected)
1>
2> drop table project
3> GO
1>

           
       








Related examples in the same category

1.Query a single row
2.Limiting the Search result using where clause
3.Use variable in where statement
4.Where value 'IS NULL'
5.Using defined variables in where clause
6.WHERE clause conditions can either be simple or contain multiple conditions
7.Use of a comparison operator in the WHERE clause
8.Use query in where clause