About 74,000 results
Open links in new tab
  1. sql - How to create a View with a With statement ... - Stack Overflow

    Aug 6, 2014 · Put the with after the create view statement: create view t2 as with t as (select 1 as col) select * from t; Here is a SQL Fiddle showing this example.

  2. Can we pass parameters to a view in SQL? - Stack Overflow

    Apr 7, 2017 · A view is a stored sql text of a select query. Parameters are out of the discussion. When your stored query returns the column where you want to filter with, you can do it in the …

  3. Create Database Views using EF Core Code First approach

    21 I am working on a new application that requires, the creation of DB Views. I am using EF core with MySql flavor and using the Code First approach to create the DB and tables. I didn't find a …

  4. Is it possible to create index on view columns? - Stack Overflow

    When I am creating an index on a view, it shows the following error: ORA-01702: a view is not appropriate here create view xx_emp for select * from emp; What is the reason behind it?

  5. IF condition in view in SQL Server - Stack Overflow

    Views only allow select statements as stated in here if you need to do if on column values you can use a SELECT CASE WHEN COLUMN1 = 1 THEN COLUMNX ELSE COLUMNY END FROM …

  6. sql - When to use a View instead of a Table? - Stack Overflow

    Views can be used to ensure that users only have access to a set of records - for instance, a view of the tables for a particular client and no security rights on the tables can mean that the users …

  7. Is there a way to retrieve the view definition from a SQL Server …

    Which version of SQL Server? For SQL Server 2005 and later, you can obtain the SQL script used to create the view like this: select definition from sys.objects o join sys.sql_modules m on …

  8. sql server - Create View - Declare a variable - Stack Overflow

    I am creating a view that is using that STUFF function. I want to put the result of STUFF in a variable for my view. The problem I am having is declaring my variable. It gives me the …

  9. sql - Creating a View using stored procedure - Stack Overflow

    Oct 10, 2011 · 17 If you want to create a view from within a SP you need to use dynamic SQL. Something like this. create procedure ProcToCreateView as exec ('create view MyView as …

  10. sql - Creating View from Another View - Stack Overflow

    You can sometimes get performance issues doing this, and it might be faster and more reliable - though possibly harder to maintain - if you create your new view against the same base tables, …