How to run a select statement on SQL Plus to view basic database information

Updated on technology 2024-04-06
11 answers
  1. Anonymous users2024-02-07

    select * from v$database;View the current database.

  2. Anonymous users2024-02-06

    The display cursor function in the Oracle 10G DBMS xplan package is different from the display function, the display cursor is used to display the real execution plan of the SQL statement, and in most cases, the display of the real execution plan is helpful to better analyze the whole process of the SQL statement, especially the real-time cost of running the SQL statement. This is determined by comparing the estimated IO with the actual IO cost.

    Problems with SQL statements, such as the lack of statistics, the number of SQL statements executed, and the selection of appropriate connection methods based on the size of the actual intermediate result set. This article is just about it.

  3. Anonymous users2024-02-05

    I've looked at a lot of SQL query statements on the Internet, but I feel like those are very simple, can anyone give me some advanced SQL interview questions I've done, I wrote the table and added the test data, if you're interested, try one.

  4. Anonymous users2024-02-04

    Oracle.

    Oracle appends a comment on a table field with a comment on table comment on column.

    create table "mr_dept" (

    dept_id" number not null ,parent_id" number,dept_name" char(20) not null ,status" number default 1 not null ,primary key ("dept_id")

    comment on table "mr_dept" is 'Department table';

    comment on column "mr_dept"."dept_id" is 'Department number';

    comment on column "mr_dept"."parent_id" is 'Parent department number';

    comment on column "mr_dept"."dept_name" is 'Department name';

    comment on column "mr_dept"."status" is 'Status';

    After the remarks are added, how can I search for them in the query?

    Remarks in the query table.

    select

    table_name,table_type,comments

    fromuser_tab_comments

    wheretable_name = 'mr_dept;

    Comment information for the query field.

    select

    table_name,column_name,comments

    fromuser_col_comments

    wheretable_name = 'mr_dept;

  5. Anonymous users2024-02-03

    You just need to do it.

    select * from user_tab_comments;

  6. Anonymous users2024-02-02

    What kind of database is it?

  7. Anonymous users2024-02-01

    select [field to be searched for copy] from [table name] where [specified bai query conditions].

    There is a need to remember.

    What is explained is that if there are multiple conditions, you need to use and to join each query condition, and if you need to sort, the syntax is:

    select [field to be queried] from [table name] where [specified search conditions].

    order by [fields to group].

  8. Anonymous users2024-01-31

    Description: SQL Server database can be copied and queried with conditions to achieve the display of data records that meet the query conditions. The query syntax is:

    select * from table name where field name = condition (syntax description: the * sign after select represents all fields displayed.) If the condition is a character condition, you need to use single quotation marks, if it is an int type, you need to use two query methods:

    1. The syntax of the complete conditional query is as follows: select * from table name where field name = condition.

    Query statement: select * from user user where dname='Administrators'

    2. The query syntax of fuzzy query conditions is: select * from table name where field name like'%Condition%' 。The condition here only needs one of the characters to be able to match the match in the field.

    Query statement: select * from user user where dadd like'% more expensive'

  9. Anonymous users2024-01-30

    select *from table_name

    where is followed by the condition that you specify, such as name='Bruce Lee'Something like that.

  10. Anonymous users2024-01-29

    Hello Lao Tie.

    select * from TableName Where Condition...

  11. Anonymous users2024-01-28

    Note here:

    isql -u natuser -p zjtt@nat -s natdb <

    That is, redirect the query results to a file.

    2 To output to variables.

    isql -u natuser -p zjtt@nat -s natdb <·3 If you want to output to a variable in a loop, you can refer to the read method by analogy.

Related questions
8 answers2024-04-06

As an example, let's say your SQL file is:

The save path is d: script, then execute it in sqlplus with the following syntax: >>>More

7 answers2024-04-06

Do you have SQL Server 2000 installed on your computer? If you install it, use the query analyzer, open the file in the interface, press f5 to execute, and the result will be generated, but the language must have a corresponding database file. Comments are made with * >>>More

9 answers2024-04-06

Multi-window split-screen function, operation method:

1.Tap the Recent Tasks button - tap the "Lu" icon in the top right corner of an app and this app will be displayed in the upper half of the screen, then select another app to display in the lower half of the screen. >>>More

5 answers2024-04-06

Legal analysis: If the person subject to enforcement states that there is no property available for enforcement, then the people's court will investigate the property status of the person subject to enforcement, and the applicant can also provide clues about the property of the person subject to enforcement to the court. >>>More

2 answers2024-04-06

1. MySQL database has several configuration options that can help us capture inefficient SQL statements in a timely manner1, Slow Query Log >>>More