81. How can we change the name of a column of a table?
ALTER TABLE table_name change OLD_COLUMN_NAME NEW_COLUMN_NAME VARCHAR(255) NULL;
82. How can we change the name and data type of a column of a table?
To Change Name of Column:
Sy: Alter Table '<'Table Name> Change '<'Old ColumnName> '<'New ColumnName>;
Ex: Alter Table Test Change EmpId EID varchar(5);
To Change DataType of Column:
Sy: Alter Table '<'Table Name> Modify '<'ColumnName> '<'DataType>;
Ex: Alter Table Test Modify EmpId varchar(5);
83. What are the differences between drop a table and truncate a table?
Drop - will Delete the table date as well as the tablestructure.
Truncate - Will Delete the table data only. The table structure will remains.
84. When you want to show some part of a text displayed on an HTML page in red font color, what different possibilities are there to do this? What are the advantages/disadvantages of these methods?
Echo '<'font color=”red”>'.$siva.'<'/font>';
Advantages:
All the coding include the same page;
disadvantages
Not structured programming.
85. When viewing an HTML page in a Browser, the Browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
Answer :When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder.
A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed. To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML ocument.
86. What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods?
we are using get, post ,session, cookie method for passing data. in get method
it pass data through url.and post passes data through hidden variable. and in
session we create session variable these variable store on server . and cokkie same
as session but cookie store at client machine.
No comments:
Post a Comment