SQL obtains all user names, database names, all table names, all field names, and field types. 2009 - 03 - 14 10 : 48 1 . Get all user names: Select Name From Sysusers Where Status = ' 2 ' And Islogin = ' 1 ' Islogin
--Get Stored Procedure creation statement Select O.xtype,o.name,cm.text from syscomments cm inner join sysobjects o on o.id=cm.id where xtype = ' P ' order By o.xtype,o.name,cm.text--get view path creation statement Select O.xtype,o.name,cm.text from syscomments cm inner join sysobjects o on o.id=cm . ID where xtype = ' V ' ORDER by o.xtype,o.name,cm.text--queries all table names, field names,
operation wordsA:union operatorThe UNION operator derives a result table by combining the other two result tables (for example, TABLE1 and TABLE2) and eliminating any duplicate rows in the table. When all is used with the Union (that is, union ALL), duplicate rows are not eliminated. In both cases, each row of the derived table is either from TABLE1 or from TABLE2.B:except operatorThe EXCEPT operator derives a result table by including all rows in TABLE1 but not in TABLE2 and eliminating all du
--oracle See all of the user's table names, table comments, field names, field comments, empty, field type SELECT DISTINCT table_column.*, table_nallable. Data_type, table_nallable. NULLABLE from (SELECT DISTINCT Utc.table_name table_name, utc.comments table_comments, Ucc.column_name column_name, ucc.comments column_comments from User_tab _comments UTC, User_col_comments UCC where utc
Get table names and comments:Select Relname as Tabname,cast (obj_description (Relfilenode, ' pg_class ') as varchar) as comment from Pg_class Cwhere relkind = ' R ' and Relname not-like ' pg_% ' and relname not-like ' sql_% ' ORDER by RelnameFilter out the Sub-table:Conditional and relchecks=0 can beGets the field name, type, comment, whether it is empty:SELECT col_description (A.attrelid,a.attnum) as Comment,format_type (A.atttypid,a.atttypmod) as ty
name is stored in the symbol table and the index in the symbol table is mapped to the actual physical space (Address). When this variable is called, you can find the corresponding address and set the value to the symbol table.
The above analyzes the variable names of basic data types (such as int and char. In addition to variable names, C also includes function
applies to modifyingALTER TABLE ' table_name ' change ' column_name ' column_name ' type (longth) UNSIGNED null DEFAULT null COMMENT ' comment '
7. Adjust the order of the fields:ALTER TABLE table nameChange field name new field FirstName type default after field name (after which field is skipped)Example:
The code is as follows
Copy Code
ALTER TABLE appstore_souapp_app_androidmarket;Change getpricecurrency getpricecurrency varchar (+) default n
table change before field names modified field name int (one) not NULL,Change before field names modified field name int (one) not NULL,Change before field names modified field name int (one) not NULL,Change before field names modified field name int (one) not NULL,Change before field
Variable names in PythonThe letter ' name ', ' age ',--Digital ' name1 ', ' age1 '--Underline ' name_1 ', ' age_1 'Note: You cannot start with a number:1name_, cannot be a keyword in python, it is best not to duplicate something built into python, such as: ' and ', ' as ', ' Break ', ' class ' ....Add: When writing variable names, try to make the variable name meaningful, such as user ID should write user_i
Select A.name as table name, b.name as column name, c.name as type, b.max_length as Byte count, b.precision As Integer, B.scale as decimal from Sys.tables a INNER JOIN Sys.columns B on a.object_id=b.object_id inner join Sys. Types C on c.user_type_id=b.user_type_idThis article is from the "IT" blog, so be sure to keep this source http://8577754.blog.51cto.com/8567754/1553205How to use a statement in an SQL query to query the column
Tags: style blog http ar sp data on Div artModifying the data type of a column name or column in MySQL(2012-04-03 08:59:25)reproduced
Tags: mysql modify column name modify column data type it
Category: Databases
Refer to the syntax in the links belowHttp://dev.mysql.com/doc/refman/5.0/en/alter-table.htmlMethods to modify only the data type of a column:Can usually be written as ALTER TABLE name modify column column name new typeFor example: The type of column
Note: Source Network
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> -- ========================================================== ============================== -- Lists All SQL Server tables, field names, primary keys, types, lengths, decimal places, and other information. -- Run in the query analyzer. -- ========================================
Get all tables of the database and their field names, types, lengths
Http://hi.baidu.com/%B7%E7%D3%F8/blog/item/db6d0835b7d6af305bb5f5c5.html
' Use instructions:' 1. Configure database type, see Issqldatabase' 2. Configure database name, account number, password and other parameter values, see conn.connectionstring'Const issqldatabase = 1 ' database type 1 is SQL database, 0 is an Access databaseDim Conn,r
,stringPropertyName,Objectpropertyval) {
//find out the typeType type =Inputobject.gettype (); //get the property information based on the typeSystem.Reflection.PropertyInfo PropertyInfo =type.
GetProperty (PropertyName); //Find the property typeType PropertyType =Propertyinfo.propertytype; //Convert.changetype does not handle conversion to nullable types//If the property type was nullable, we need to get the underlying type o
"Done ." - in Print "Connect to remote host%d ..."%Port - to #catch Exception: The server may not have the corresponding service turned on, or the network problem causes the connection failure to occur unexpectedly + Try: - #connecting to the service side theS.connect (("www.baidu.com", port)) * exceptSocket.error as E: $ #ExceptionPanax Notoginseng Print "Strange Error creating socket:%s"%e -Sys.exit (1) the + Print "Done ." A the #information that can be obtained when a co
Label:--Query database allSELECT (case if A.colorder=1 then d.name else null end) Table name,A.colorder field ordinal, a.name field name,IsNull (G.[value], ") as [description]From Syscolumns ALeft join Systypes B on A.xtype=b.xusertypeINNER JOIN sysobjects D on a.id=d.id and d.xtype= ' U ' and d.nameLeft join syscomments E on a.cdefault=e.idLeft joins Sys.extended_properties G on a.id=g.major_id and a.colid=g.minor_idLeft join Sys.extended_properties F on D.id=f.class and f.minor_id=0Where b.nam
SELECTTable name= Case whenA.colorder=1 ThenD.nameElse "' End, table describes= Case whenA.colorder=1 Then IsNull(F.value,"')Else "' End, Field ordinal=a.colorder, field name=a.name, Logo= Case when ColumnProperty(A.id,a.name,'isidentity')=1 Then '√'Else "' End, PRIMARY key= Case when exists(SELECT 1 fromsysobjectswhereXtype='PK' andParent_obj=a.ID andNameinch ( SELECTName fromsysindexesWHEREIndidinch(SELECTIndid fromSysindexkeysWHEREId=a.ID andColid=A.colid))) T
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.