database-view

    0熱度

    1回答

    我創建空的觀點有以下查詢: CREATE VIEW `test` AS select * from `configurations` where 0; 考慮configurations表有100條記錄與主鍵id從開始到0100。 我想在循環內插入數據的視圖塊爲10。 我無法獲得任何解決方案。任何人都可以提供一些提示。 更新: 按照以下幾個步驟我想執行。 創建空的觀點(我實現了這個) 我有100

    1熱度

    2回答

    我有沒有主鍵的數據庫視圖。它有一組唯一標識視圖中的一行的列,但其中三列可以是null。我試圖創建基於這些四列的複合主鍵的實體,而是從視圖中檢索數據時出現此錯誤: The primary key read from the row ... during the execution of the query was detected to be null. Primary keys must not

    0熱度

    1回答

    有沒有辦法將HTML結構存儲在SQL視圖中,並通過控制器將其輸出到存儲的HTML結構中? 例如,這裏是希望我通過控制器集成在一個SQL視圖,並輸出到存儲樣本HTML <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<vwStudent>>" %> <html> <body> <table>

    0熱度

    1回答

    我有一個名爲「Test」的MongoDB數據庫。在這個數據庫中,我收集了「人員」集合中的人員。人們集合包含以下文件的數組: class Person{ public int Id { get; set; } public string Name { get; set; } public Address[] Addresses { get; set; } } cl

    0熱度

    1回答

    我遵循Frank Rietta關於「爲SQL視圖添加Rake任務到Rails項目」的優秀post。我喜歡他關於rails中數據庫視圖的觀點和他的干涉方法。 我能夠做的rake db:views並創建我的觀點,但我沒能獲得在模型中的信息,這是我models/reports/revenue.rb class Report::Revenue < ApplicationRecord self.t

    0熱度

    1回答

    合併兩個表我有兩個表: financials_standalone ('fin_id', 'attr_id', 'year', 'value'); financials_consolidated ('fin_id', 'attr_id', 'year', 'value'); ('fin_id', 'attr_id', 'year') is the unique key financial

    -2熱度

    1回答

    創建視圖在Oracle中我有2個表: create table my_users (userid number, username varchar(20) ); create table all_users (userid number, username varchar(20) ); 我想創建一個視圖這相當於: select * from all_users;

    2熱度

    1回答

    我有一個名爲my_view的視圖,它是使用以下遷移創建的。 class CreateMyView < ActiveRecord::Migration def change execute <<-SQL drop view if exists my_view SQL execute <<-SQL CREATE OR REPLACE V