About 50 results
Open links in new tab
  1. 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 calling query. …

  2. sql - How to create a View with a With statement ... - Stack Overflow

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

  3. sql - 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?

  4. sql - Create Table from View - Stack Overflow

    Jul 14, 2011 · See this answer will help you. script on this answer get you scripts for generate all tables in database. If you modify last where condition, you can get scripts for create table from views. The …

  5. How to make CREATE OR REPLACE VIEW work in SQL Server?

    Jul 18, 2015 · CREATE OR REPLACE VIEW doesn't seem to work in SQL Server. So how do I port CREATE OR REPLACE VIEW to work on SQL Server? This is what I'm trying to do: CREATE OR …

  6. 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 message "Incor...

  7. How to retrieve the SQL used to create a view in Oracle?

    Apr 25, 2014 · In Oracle, to retrieve the SQL used to create a Function, Package, etc, the user_source view can be queried. However, views are not included in this view - nor do they exist in the …

  8. sql server - Is it possible to create a temporary table in a View and ...

    0 Try creating another SQL view instead of a temporary table and then referencing it in the main SQL view. In other words, a view within a view. You can then drop the first view once you are done …

  9. sql - create view with cursor or loop - Stack Overflow

    I have managed to create a table from a cursor that inserted rows from similarly named tables in my database. It worked succesfully, but I would like to create a view so that I don't need to update...

  10. sql server - Create view with primary key? - Stack Overflow

    Sep 16, 2016 · You cannot create a primary key on a view. In SQL Server you can create an index on a view but that is different to creating a primary key. If you give us more information as to why you …