About 31,000 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 - 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 …

  4. 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?

  5. How to check if a view exists and create if it does not

    Mar 7, 2018 · Unless I'm reading your SQL wrong, your EXISTS is checking for the existence, and then you're trying to CREATE it. If the view already exists, the CREATE will fail.

  6. 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 …

  7. 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...

  8. sql - grant create view on Oracle 11g - Stack Overflow

    1 You need to GRANT the CREATE VIEW privilege to the USER which is creating the view. For example, I create a new user to let it create a session, a table and a view:

  9. Is it possible to change the datatype of a column in a view?

    Mar 2, 2016 · You can't dictate the data type for the output column of a view. The best you can do is as @buckley suggested - use CAST or CONVERT to force an explicit data type inline in the view definition.

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

    create or replace view my_view_3 as select mv1.id, mv1.name, mv1.address from my_view_1 mv1 join my_table mt on mt.id = mv1.id; SQL Error: ORA-00904: "MV1"."ADDRESS": invalid identifier 00904. …