About 34,500 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 …

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

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

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

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

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

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

  9. Can I specify column types when creating an SQL Server view?

    Dec 14, 2012 · Seeking to enforce more strict type safety and make it easier to detect mistakes, I would like to specify column types of my view explicitly. But while this works: CREATE VIEW …

  10. Create a view with ORDER BY clause - Stack Overflow

    Mar 4, 2013 · I'm trying to create a view with an ORDER BY clause. I have create it successfully on SQL Server 2012 SP1, but when I try to re-create it on SQL Server 2008 R2, I get this …